diff options
author | Len Brown <len.brown@intel.com> | 2010-05-22 17:03:29 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2010-05-27 21:07:04 -0400 |
commit | 541adf7cd937b3895c7645406a9b060504df453b (patch) | |
tree | 99d6b50aed68071a0aca0957f08bd1b95367fe0c /drivers/acpi | |
parent | 752138df0dc2daaae09379c754caeb08c97905dc (diff) |
ACPI: allow a native cpuidle driver to displace ACPI
The ACPI driver would fail probe when it found that
another driver had previously registered with cpuidle.
But this is a natural situation, as a native hardware
cpuidle driver should be able to bind instead of ACPI,
and the ACPI processor driver should be able to handle
yielding control of C-states while still handling
P-states and T-states.
Add a KERN_DEBUG line showing when acpi_idle
does successfully register.
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/processor_driver.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/acpi/processor_driver.c b/drivers/acpi/processor_driver.c index 5675d9747e87..deefa8591746 100644 --- a/drivers/acpi/processor_driver.c +++ b/drivers/acpi/processor_driver.c | |||
@@ -616,7 +616,8 @@ static int __cpuinit acpi_processor_add(struct acpi_device *device) | |||
616 | acpi_processor_get_limit_info(pr); | 616 | acpi_processor_get_limit_info(pr); |
617 | 617 | ||
618 | 618 | ||
619 | acpi_processor_power_init(pr, device); | 619 | if (cpuidle_get_driver() == &acpi_idle_driver) |
620 | acpi_processor_power_init(pr, device); | ||
620 | 621 | ||
621 | pr->cdev = thermal_cooling_device_register("Processor", device, | 622 | pr->cdev = thermal_cooling_device_register("Processor", device, |
622 | &processor_cooling_ops); | 623 | &processor_cooling_ops); |
@@ -920,9 +921,10 @@ static int __init acpi_processor_init(void) | |||
920 | if (!acpi_processor_dir) | 921 | if (!acpi_processor_dir) |
921 | return -ENOMEM; | 922 | return -ENOMEM; |
922 | #endif | 923 | #endif |
923 | result = cpuidle_register_driver(&acpi_idle_driver); | 924 | |
924 | if (result < 0) | 925 | if (!cpuidle_register_driver(&acpi_idle_driver)) |
925 | goto out_proc; | 926 | printk(KERN_DEBUG "ACPI: %s registered with cpuidle\n", |
927 | acpi_idle_driver.name); | ||
926 | 928 | ||
927 | result = acpi_bus_register_driver(&acpi_processor_driver); | 929 | result = acpi_bus_register_driver(&acpi_processor_driver); |
928 | if (result < 0) | 930 | if (result < 0) |
@@ -941,7 +943,6 @@ static int __init acpi_processor_init(void) | |||
941 | out_cpuidle: | 943 | out_cpuidle: |
942 | cpuidle_unregister_driver(&acpi_idle_driver); | 944 | cpuidle_unregister_driver(&acpi_idle_driver); |
943 | 945 | ||
944 | out_proc: | ||
945 | #ifdef CONFIG_ACPI_PROCFS | 946 | #ifdef CONFIG_ACPI_PROCFS |
946 | remove_proc_entry(ACPI_PROCESSOR_CLASS, acpi_root_dir); | 947 | remove_proc_entry(ACPI_PROCESSOR_CLASS, acpi_root_dir); |
947 | #endif | 948 | #endif |