diff options
| -rw-r--r-- | drivers/acpi/ac.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/acpi/ac.c b/drivers/acpi/ac.c index 206f56d2aa3a..447de542cb46 100644 --- a/drivers/acpi/ac.c +++ b/drivers/acpi/ac.c | |||
| @@ -89,7 +89,7 @@ static int acpi_ac_get_state(struct acpi_ac *ac) | |||
| 89 | if (!ac) | 89 | if (!ac) |
| 90 | return -EINVAL; | 90 | return -EINVAL; |
| 91 | 91 | ||
| 92 | status = acpi_evaluate_integer(ac->handle, "_PSR", NULL, &ac->state); | 92 | status = acpi_evaluate_integer(ac->device->handle, "_PSR", NULL, &ac->state); |
| 93 | if (ACPI_FAILURE(status)) { | 93 | if (ACPI_FAILURE(status)) { |
| 94 | ACPI_EXCEPTION((AE_INFO, status, "Error reading AC Adapter state")); | 94 | ACPI_EXCEPTION((AE_INFO, status, "Error reading AC Adapter state")); |
| 95 | ac->state = ACPI_AC_STATUS_UNKNOWN; | 95 | ac->state = ACPI_AC_STATUS_UNKNOWN; |
| @@ -236,7 +236,7 @@ static int acpi_ac_add(struct acpi_device *device) | |||
| 236 | if (result) | 236 | if (result) |
| 237 | goto end; | 237 | goto end; |
| 238 | 238 | ||
| 239 | status = acpi_install_notify_handler(ac->handle, | 239 | status = acpi_install_notify_handler(device->handle, |
| 240 | ACPI_DEVICE_NOTIFY, acpi_ac_notify, | 240 | ACPI_DEVICE_NOTIFY, acpi_ac_notify, |
| 241 | ac); | 241 | ac); |
| 242 | if (ACPI_FAILURE(status)) { | 242 | if (ACPI_FAILURE(status)) { |
| @@ -268,7 +268,7 @@ static int acpi_ac_remove(struct acpi_device *device, int type) | |||
| 268 | 268 | ||
| 269 | ac = (struct acpi_ac *)acpi_driver_data(device); | 269 | ac = (struct acpi_ac *)acpi_driver_data(device); |
| 270 | 270 | ||
| 271 | status = acpi_remove_notify_handler(ac->handle, | 271 | status = acpi_remove_notify_handler(device->handle, |
| 272 | ACPI_DEVICE_NOTIFY, acpi_ac_notify); | 272 | ACPI_DEVICE_NOTIFY, acpi_ac_notify); |
| 273 | 273 | ||
| 274 | acpi_ac_remove_fs(device); | 274 | acpi_ac_remove_fs(device); |
