ACPI: ac: Use acpi_device's handle instead of driver's
Signed-off-by: Patrick Mochel <mochel@linux.intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
This commit is contained in:
committed by
Len Brown
parent
e6afa0de14
commit
a6ba5ebef9
@@ -89,7 +89,7 @@ static int acpi_ac_get_state(struct acpi_ac *ac)
|
|||||||
if (!ac)
|
if (!ac)
|
||||||
return -EINVAL;
|
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)) {
|
if (ACPI_FAILURE(status)) {
|
||||||
ACPI_EXCEPTION((AE_INFO, status, "Error reading AC Adapter state"));
|
ACPI_EXCEPTION((AE_INFO, status, "Error reading AC Adapter state"));
|
||||||
ac->state = ACPI_AC_STATUS_UNKNOWN;
|
ac->state = ACPI_AC_STATUS_UNKNOWN;
|
||||||
@@ -236,7 +236,7 @@ static int acpi_ac_add(struct acpi_device *device)
|
|||||||
if (result)
|
if (result)
|
||||||
goto end;
|
goto end;
|
||||||
|
|
||||||
status = acpi_install_notify_handler(ac->handle,
|
status = acpi_install_notify_handler(device->handle,
|
||||||
ACPI_DEVICE_NOTIFY, acpi_ac_notify,
|
ACPI_DEVICE_NOTIFY, acpi_ac_notify,
|
||||||
ac);
|
ac);
|
||||||
if (ACPI_FAILURE(status)) {
|
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);
|
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_DEVICE_NOTIFY, acpi_ac_notify);
|
||||||
|
|
||||||
acpi_ac_remove_fs(device);
|
acpi_ac_remove_fs(device);
|
||||||
|
Reference in New Issue
Block a user