mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-07 13:43:51 +00:00
cpuidle: haltpoll: Call cpuidle_poll_state_init() later
Call cpuidle_poll_state_init() only if it is needed to avoid doing useless work. Signed-off-by: Li RongQing <lirongqing@baidu.com> [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
parent
3a9cf77b60
commit
659b66e98b
@ -108,11 +108,11 @@ static int __init haltpoll_init(void)
|
|||||||
if (boot_option_idle_override != IDLE_NO_OVERRIDE)
|
if (boot_option_idle_override != IDLE_NO_OVERRIDE)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
cpuidle_poll_state_init(drv);
|
|
||||||
|
|
||||||
if (!kvm_para_available() || !haltpoll_want())
|
if (!kvm_para_available() || !haltpoll_want())
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
|
cpuidle_poll_state_init(drv);
|
||||||
|
|
||||||
ret = cpuidle_register_driver(drv);
|
ret = cpuidle_register_driver(drv);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
Loading…
Reference in New Issue
Block a user