]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
ACPI / PM: Drop acpi_power_nocheck
authorRafael J. Wysocki <rjw@sisk.pl>
Sat, 11 Dec 2010 22:45:30 +0000 (23:45 +0100)
committerLen Brown <len.brown@intel.com>
Wed, 12 Jan 2011 09:48:45 +0000 (04:48 -0500)
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>
drivers/acpi/bus.c
drivers/acpi/internal.h
drivers/acpi/power.c

index 0baa5f97734a2d585480cd99da523aafa4aa00e3..7ced61f394924e3e0eeb208de094f894cfd5e623 100644 (file)
@@ -52,22 +52,6 @@ EXPORT_SYMBOL(acpi_root_dir);
 
 #define STRUCT_TO_INT(s)       (*((int*)&s))
 
-static int set_power_nocheck(const struct dmi_system_id *id)
-{
-       printk(KERN_NOTICE PREFIX "%s detected - "
-               "disable power check in power transition\n", id->ident);
-       acpi_power_nocheck = 1;
-       return 0;
-}
-static struct dmi_system_id __cpuinitdata power_nocheck_dmi_table[] = {
-       {
-       set_power_nocheck, "HP Pavilion 05", {
-       DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
-       DMI_MATCH(DMI_SYS_VENDOR, "HP Pavilion 05"),
-       DMI_MATCH(DMI_PRODUCT_VERSION, "2001211RE101GLEND") }, NULL},
-       {},
-};
-
 
 #ifdef CONFIG_X86
 static int set_copy_dsdt(const struct dmi_system_id *id)
@@ -333,23 +317,6 @@ int acpi_bus_set_power(acpi_handle handle, int state)
                return -ENODEV;
        }
 
-       /*
-        * Get device's current power state
-        */
-       if (!acpi_power_nocheck) {
-               /*
-                * Maybe the incorrect power state is returned on the bogus
-                * bios, which is different with the real power state.
-                * For example: the bios returns D0 state and the real power
-                * state is D3. OS expects to set the device to D0 state. In
-                * such case if OS uses the power state returned by the BIOS,
-                * the device can't be transisted to the correct power state.
-                * So if the acpi_power_nocheck is set, it is unnecessary to
-                * get the power state by calling acpi_bus_get_power.
-                */
-               __acpi_bus_get_power(device, &device->power.state);
-       }
-
        return __acpi_bus_set_power(device, state);
 }
 EXPORT_SYMBOL(acpi_bus_set_power);
@@ -1072,12 +1039,6 @@ static int __init acpi_init(void)
        if (acpi_disabled)
                return result;
 
-       /*
-        * If the laptop falls into the DMI check table, the power state check
-        * will be disabled in the course of device power transition.
-        */
-       dmi_check_system(power_nocheck_dmi_table);
-
        acpi_scan_init();
        acpi_ec_init();
        acpi_debugfs_init();
index 7493e6c7a003ef984d0a3f5445d016cc847c77e7..8df5d7061a4581a55b2d230f639bbecd082ef4e8 100644 (file)
@@ -45,7 +45,6 @@ int acpi_power_get_inferred_state(struct acpi_device *device, int *state);
 int acpi_power_on_resources(struct acpi_device *device, int state);
 int acpi_power_transition(struct acpi_device *device, int state);
 int acpi_bus_init_power(struct acpi_device *device);
-extern int acpi_power_nocheck;
 
 int acpi_wakeup_device_init(void);
 void acpi_early_processor_set_pdc(void);
index 0cb4eab50d734e862d1a85d4dd0693d4d15d0173..0003f1009885c692c89f07c2f4321df33ceb562a 100644 (file)
@@ -56,9 +56,6 @@ ACPI_MODULE_NAME("power");
 #define ACPI_POWER_RESOURCE_STATE_ON   0x01
 #define ACPI_POWER_RESOURCE_STATE_UNKNOWN 0xFF
 
-int acpi_power_nocheck;
-module_param_named(power_nocheck, acpi_power_nocheck, bool, 000);
-
 static int acpi_power_add(struct acpi_device *device);
 static int acpi_power_remove(struct acpi_device *device, int type);
 static int acpi_power_resume(struct acpi_device *device);