aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/bus.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2010-12-11 17:45:30 -0500
committerLen Brown <len.brown@intel.com>2011-01-12 04:48:45 -0500
commit53eac700b0df1fef8c957b9eedfd7f48120425e3 (patch)
tree3793c9389b4d9e27936d296a35e54fc8200b6a5c /drivers/acpi/bus.c
parentf6767dcf2a4f6e62960912d0affec1e15a246191 (diff)
ACPI / PM: Drop acpi_power_nocheck
Since acpi_bus_set_power() should not use __acpi_bus_get_power() to update the device's device->power.state field before changing its power state (this may cause device->power.state to be inconsistent with the device power resources' reference counters), remove this call from it. In consequence, the acpi_power_nocheck variable is not necessary any more, so it can be dropped along with the DMI table used for setting that variable for HP Pavilion 05. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/bus.c')
-rw-r--r--drivers/acpi/bus.c39
1 files changed, 0 insertions, 39 deletions
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index 0baa5f97734a..7ced61f39492 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -52,22 +52,6 @@ EXPORT_SYMBOL(acpi_root_dir);
52 52
53#define STRUCT_TO_INT(s) (*((int*)&s)) 53#define STRUCT_TO_INT(s) (*((int*)&s))
54 54
55static int set_power_nocheck(const struct dmi_system_id *id)
56{
57 printk(KERN_NOTICE PREFIX "%s detected - "
58 "disable power check in power transition\n", id->ident);
59 acpi_power_nocheck = 1;
60 return 0;
61}
62static struct dmi_system_id __cpuinitdata power_nocheck_dmi_table[] = {
63 {
64 set_power_nocheck, "HP Pavilion 05", {
65 DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
66 DMI_MATCH(DMI_SYS_VENDOR, "HP Pavilion 05"),
67 DMI_MATCH(DMI_PRODUCT_VERSION, "2001211RE101GLEND") }, NULL},
68 {},
69};
70
71 55
72#ifdef CONFIG_X86 56#ifdef CONFIG_X86
73static int set_copy_dsdt(const struct dmi_system_id *id) 57static int set_copy_dsdt(const struct dmi_system_id *id)
@@ -333,23 +317,6 @@ int acpi_bus_set_power(acpi_handle handle, int state)
333 return -ENODEV; 317 return -ENODEV;
334 } 318 }
335 319
336 /*
337 * Get device's current power state
338 */
339 if (!acpi_power_nocheck) {
340 /*
341 * Maybe the incorrect power state is returned on the bogus
342 * bios, which is different with the real power state.
343 * For example: the bios returns D0 state and the real power
344 * state is D3. OS expects to set the device to D0 state. In
345 * such case if OS uses the power state returned by the BIOS,
346 * the device can't be transisted to the correct power state.
347 * So if the acpi_power_nocheck is set, it is unnecessary to
348 * get the power state by calling acpi_bus_get_power.
349 */
350 __acpi_bus_get_power(device, &device->power.state);
351 }
352
353 return __acpi_bus_set_power(device, state); 320 return __acpi_bus_set_power(device, state);
354} 321}
355EXPORT_SYMBOL(acpi_bus_set_power); 322EXPORT_SYMBOL(acpi_bus_set_power);
@@ -1072,12 +1039,6 @@ static int __init acpi_init(void)
1072 if (acpi_disabled) 1039 if (acpi_disabled)
1073 return result; 1040 return result;
1074 1041
1075 /*
1076 * If the laptop falls into the DMI check table, the power state check
1077 * will be disabled in the course of device power transition.
1078 */
1079 dmi_check_system(power_nocheck_dmi_table);
1080
1081 acpi_scan_init(); 1042 acpi_scan_init();
1082 acpi_ec_init(); 1043 acpi_ec_init();
1083 acpi_debugfs_init(); 1044 acpi_debugfs_init();