OSDN Git Service

intel_idle: Refactor intel_idle_cpuidle_driver_init()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 13 Dec 2019 08:55:52 +0000 (09:55 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 27 Dec 2019 10:02:07 +0000 (11:02 +0100)
commit9f3d6daf61e5156139cd05643f7f1c2a9b7b49b0
tree8ec73b4ba51d4c6626a8e70f3ca76931159d016d
parent77fb4e0a559a960eb36d0b2c50c781c5492577eb
intel_idle: Refactor intel_idle_cpuidle_driver_init()

Move the C-state verification and checks from
intel_idle_cpuidle_driver_init() to a separate function,
intel_idle_verify_cstate(), and make the former call it after
checking the CPUIDLE_FLAG_UNUSABLE state flag.

Also combine the drv->states[] updates with the incrementation of
drv->state_count.

No intentional functional impact.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/idle/intel_idle.c