]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ACPI: ac: Use acpi_device's handle instead of driver's
authorPatrick Mochel <mochel@linux.intel.com>
Fri, 19 May 2006 20:54:41 +0000 (16:54 -0400)
committerLen Brown <len.brown@intel.com>
Fri, 30 Jun 2006 06:37:05 +0000 (02:37 -0400)
Signed-off-by: Patrick Mochel <mochel@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/acpi/ac.c

index 206f56d2aa3a0623e76ba8d1a12bc89f69e03ab4..447de542cb462724fd2af8170c3ce34c9c7814e4 100644 (file)
@@ -89,7 +89,7 @@ static int acpi_ac_get_state(struct acpi_ac *ac)
        if (!ac)
                return -EINVAL;
 
-       status = acpi_evaluate_integer(ac->handle, "_PSR", NULL, &ac->state);
+       status = acpi_evaluate_integer(ac->device->handle, "_PSR", NULL, &ac->state);
        if (ACPI_FAILURE(status)) {
                ACPI_EXCEPTION((AE_INFO, status, "Error reading AC Adapter state"));
                ac->state = ACPI_AC_STATUS_UNKNOWN;
@@ -236,7 +236,7 @@ static int acpi_ac_add(struct acpi_device *device)
        if (result)
                goto end;
 
-       status = acpi_install_notify_handler(ac->handle,
+       status = acpi_install_notify_handler(device->handle,
                                             ACPI_DEVICE_NOTIFY, acpi_ac_notify,
                                             ac);
        if (ACPI_FAILURE(status)) {
@@ -268,7 +268,7 @@ static int acpi_ac_remove(struct acpi_device *device, int type)
 
        ac = (struct acpi_ac *)acpi_driver_data(device);
 
-       status = acpi_remove_notify_handler(ac->handle,
+       status = acpi_remove_notify_handler(device->handle,
                                            ACPI_DEVICE_NOTIFY, acpi_ac_notify);
 
        acpi_ac_remove_fs(device);