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>

Len Brown 541adf7c 752138df

+6 -5
+6 -5
drivers/acpi/processor_driver.c
··· 616 acpi_processor_get_limit_info(pr); 617 618 619 - acpi_processor_power_init(pr, device); 620 621 pr->cdev = thermal_cooling_device_register("Processor", device, 622 &processor_cooling_ops); ··· 921 if (!acpi_processor_dir) 922 return -ENOMEM; 923 #endif 924 - result = cpuidle_register_driver(&acpi_idle_driver); 925 - if (result < 0) 926 - goto out_proc; 927 928 result = acpi_bus_register_driver(&acpi_processor_driver); 929 if (result < 0) ··· 943 out_cpuidle: 944 cpuidle_unregister_driver(&acpi_idle_driver); 945 946 - out_proc: 947 #ifdef CONFIG_ACPI_PROCFS 948 remove_proc_entry(ACPI_PROCESSOR_CLASS, acpi_root_dir); 949 #endif
··· 616 acpi_processor_get_limit_info(pr); 617 618 619 + if (cpuidle_get_driver() == &acpi_idle_driver) 620 + acpi_processor_power_init(pr, device); 621 622 pr->cdev = thermal_cooling_device_register("Processor", device, 623 &processor_cooling_ops); ··· 920 if (!acpi_processor_dir) 921 return -ENOMEM; 922 #endif 923 + 924 + if (!cpuidle_register_driver(&acpi_idle_driver)) 925 + printk(KERN_DEBUG "ACPI: %s registered with cpuidle\n", 926 + acpi_idle_driver.name); 927 928 result = acpi_bus_register_driver(&acpi_processor_driver); 929 if (result < 0) ··· 941 out_cpuidle: 942 cpuidle_unregister_driver(&acpi_idle_driver); 943 944 #ifdef CONFIG_ACPI_PROCFS 945 remove_proc_entry(ACPI_PROCESSOR_CLASS, acpi_root_dir); 946 #endif