]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/misc/thinkpad_acpi.c
Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
[linux-2.6-omap-h63xx.git] / drivers / misc / thinkpad_acpi.c
index 6c9b6c892288144f67671aeb0d9cee43df000739..4db1cf9078d9976b5206649aad3d0118272a000a 100644 (file)
@@ -158,7 +158,6 @@ enum {
 #define TPACPI_INFO   KERN_INFO   TPACPI_LOG
 #define TPACPI_DEBUG  KERN_DEBUG  TPACPI_LOG
 
-#define TPACPI_DBG_ALL         0xffff
 #define TPACPI_DBG_ALL         0xffff
 #define TPACPI_DBG_INIT                0x0001
 #define TPACPI_DBG_EXIT                0x0002
@@ -543,7 +542,7 @@ static int __init setup_acpi_notify(struct ibm_struct *ibm)
                return -ENODEV;
        }
 
-       acpi_driver_data(ibm->acpi->device) = ibm;
+       ibm->acpi->device->driver_data = ibm;
        sprintf(acpi_device_class(ibm->acpi->device), "%s/%s",
                TPACPI_ACPI_EVENT_PREFIX,
                ibm->name);
@@ -839,6 +838,13 @@ static int parse_strtoul(const char *buf,
        return 0;
 }
 
+static void tpacpi_disable_brightness_delay(void)
+{
+       if (acpi_evalf(hkey_handle, NULL, "PWMS", "qvd", 0))
+               printk(TPACPI_NOTICE
+                       "ACPI backlight control delay disabled\n");
+}
+
 static int __init tpacpi_query_bcl_levels(acpi_handle handle)
 {
        struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
@@ -2140,6 +2146,8 @@ static int __init hotkey_init(struct ibm_init_struct *iibm)
        if (!tp_features.hotkey)
                return 1;
 
+       tpacpi_disable_brightness_delay();
+
        hotkey_dev_attributes = create_attr_set(13, NULL);
        if (!hotkey_dev_attributes)
                return -ENOMEM;
@@ -2513,6 +2521,8 @@ static void hotkey_suspend(pm_message_t state)
 
 static void hotkey_resume(void)
 {
+       tpacpi_disable_brightness_delay();
+
        if (hotkey_mask_get())
                printk(TPACPI_ERR
                       "error while trying to read hot key mask "