aboutsummaryrefslogtreecommitdiff
path: root/drivers/acpi/button.c
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2006-07-01 17:19:34 -0400
committerLen Brown <len.brown@intel.com>2006-07-01 17:19:34 -0400
commit5f765b8d68fe99c8a575265d81c62382893e1e8a (patch)
treeef6ec9815aadfab4b8bcb09aeeb85d8dc29f4919 /drivers/acpi/button.c
parentb197ba3c70638a3a2ae39296781912f26ac0f991 (diff)
parentd07a8577f695c807977af003b6e75f996e01a15f (diff)
Pull acpi_device_handle_cleanup into release branch
Diffstat (limited to 'drivers/acpi/button.c')
-rw-r--r--drivers/acpi/button.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c
index 02594639c4d..fd1ba05eab6 100644
--- a/drivers/acpi/button.c
+++ b/drivers/acpi/button.c
@@ -82,7 +82,6 @@ static struct acpi_driver acpi_button_driver = {
};
struct acpi_button {
- acpi_handle handle;
struct acpi_device *device; /* Fixed button kludge */
u8 type;
unsigned long pushed;
@@ -137,7 +136,7 @@ static int acpi_button_state_seq_show(struct seq_file *seq, void *offset)
if (!button || !button->device)
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)) {
seq_printf(seq, "state: unsupported\n");
} else {
@@ -282,7 +281,7 @@ static acpi_status acpi_button_notify_fixed(void *data)
if (!button)
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;
}
@@ -303,7 +302,6 @@ static int acpi_button_add(struct acpi_device *device)
memset(button, 0, sizeof(struct acpi_button));
button->device = device;
- button->handle = device->handle;
acpi_driver_data(device) = button;
/*
@@ -362,7 +360,7 @@ static int acpi_button_add(struct acpi_device *device)
button);
break;
default:
- status = acpi_install_notify_handler(button->handle,
+ status = acpi_install_notify_handler(device->handle,
ACPI_DEVICE_NOTIFY,
acpi_button_notify,
button);
@@ -420,7 +418,7 @@ static int acpi_button_remove(struct acpi_device *device, int type)
acpi_button_notify_fixed);
break;
default:
- status = acpi_remove_notify_handler(button->handle,
+ status = acpi_remove_notify_handler(device->handle,
ACPI_DEVICE_NOTIFY,
acpi_button_notify);
break;