]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: cpuidle: Convert to use cpuidle_register|unregister()
authorUlf Hansson <ulf.hansson@linaro.org>
Thu, 1 Nov 2018 10:15:58 +0000 (11:15 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 8 Nov 2018 17:53:00 +0000 (18:53 +0100)
commit91367b0b897483aad9d9bb40c1dfef84493e7d2c
tree71805279dc2594b51827f50e98a81efc0ec3554e
parentdd51b6ca74e6f4e077351397ed1693ef9c756893
ARM: cpuidle: Convert to use cpuidle_register|unregister()

The only reason that remains, to why the ARM cpuidle driver calls
cpuidle_register_driver(), is to avoid printing an error message in case
another driver already have been registered for the CPU. This seems a bit
silly, but more importantly, if that is a common scenario, perhaps we
should change cpuidle_register() accordingly instead.

In either case, let's consolidate the code, by converting to use
cpuidle_register|unregister(), which also avoids the unnecessary allocation
of the struct cpuidle_device.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpuidle/cpuidle-arm.c