Commit 27b1d3e8 authored by Patrick Mochel's avatar Patrick Mochel Committed by Len Brown

ACPI: button: Use acpi_device's handle instead of driver's

Signed-off-by: default avatarPatrick Mochel <mochel@linux.intel.com>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 3b073ec3
...@@ -137,7 +137,7 @@ static int acpi_button_state_seq_show(struct seq_file *seq, void *offset) ...@@ -137,7 +137,7 @@ static int acpi_button_state_seq_show(struct seq_file *seq, void *offset)
if (!button || !button->device) if (!button || !button->device)
return 0; return 0;
status = acpi_evaluate_integer(button->handle, "_LID", NULL, &state); status = acpi_evaluate_integer(button->device->handle, "_LID", NULL, &state);
if (ACPI_FAILURE(status)) { if (ACPI_FAILURE(status)) {
seq_printf(seq, "state: unsupported\n"); seq_printf(seq, "state: unsupported\n");
} else { } else {
...@@ -282,7 +282,7 @@ static acpi_status acpi_button_notify_fixed(void *data) ...@@ -282,7 +282,7 @@ static acpi_status acpi_button_notify_fixed(void *data)
if (!button) if (!button)
return AE_BAD_PARAMETER; return AE_BAD_PARAMETER;
acpi_button_notify(button->handle, ACPI_BUTTON_NOTIFY_STATUS, button); acpi_button_notify(button->device->handle, ACPI_BUTTON_NOTIFY_STATUS, button);
return AE_OK; return AE_OK;
} }
...@@ -362,7 +362,7 @@ static int acpi_button_add(struct acpi_device *device) ...@@ -362,7 +362,7 @@ static int acpi_button_add(struct acpi_device *device)
button); button);
break; break;
default: default:
status = acpi_install_notify_handler(button->handle, status = acpi_install_notify_handler(device->handle,
ACPI_DEVICE_NOTIFY, ACPI_DEVICE_NOTIFY,
acpi_button_notify, acpi_button_notify,
button); button);
...@@ -420,7 +420,7 @@ static int acpi_button_remove(struct acpi_device *device, int type) ...@@ -420,7 +420,7 @@ static int acpi_button_remove(struct acpi_device *device, int type)
acpi_button_notify_fixed); acpi_button_notify_fixed);
break; break;
default: default:
status = acpi_remove_notify_handler(button->handle, status = acpi_remove_notify_handler(device->handle,
ACPI_DEVICE_NOTIFY, ACPI_DEVICE_NOTIFY,
acpi_button_notify); acpi_button_notify);
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment