aboutsummaryrefslogtreecommitdiffstats
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 02594639c4d9..fd1ba05eab68 100644
--- a/drivers/acpi/button.c
+++ b/drivers/acpi/button.c
@@ -82,7 +82,6 @@ static struct acpi_driver acpi_button_driver = {
82}; 82};
83 83
84struct acpi_button { 84struct acpi_button {
85 acpi_handle handle;
86 struct acpi_device *device; /* Fixed button kludge */ 85 struct acpi_device *device; /* Fixed button kludge */
87 u8 type; 86 u8 type;
88 unsigned long pushed; 87 unsigned long pushed;
@@ -137,7 +136,7 @@ static int acpi_button_state_seq_show(struct seq_file *seq, void *offset)
137 if (!button || !button->device) 136 if (!button || !button->device)
138 return 0; 137 return 0;
139 138
140 status = acpi_evaluate_integer(button->handle, "_LID", NULL, &state); 139 status = acpi_evaluate_integer(button->device->handle, "_LID", NULL, &state);
141 if (ACPI_FAILURE(status)) { 140 if (ACPI_FAILURE(status)) {
142 seq_printf(seq, "state: unsupported\n"); 141 seq_printf(seq, "state: unsupported\n");
143 } else { 142 } else {
@@ -282,7 +281,7 @@ static acpi_status acpi_button_notify_fixed(void *data)
282 if (!button) 281 if (!button)
283 return AE_BAD_PARAMETER; 282 return AE_BAD_PARAMETER;
284 283
285 acpi_button_notify(button->handle, ACPI_BUTTON_NOTIFY_STATUS, button); 284 acpi_button_notify(button->device->handle, ACPI_BUTTON_NOTIFY_STATUS, button);
286 285
287 return AE_OK; 286 return AE_OK;
288} 287}
@@ -303,7 +302,6 @@ static int acpi_button_add(struct acpi_device *device)
303 memset(button, 0, sizeof(struct acpi_button)); 302 memset(button, 0, sizeof(struct acpi_button));
304 303
305 button->device = device; 304 button->device = device;
306 button->handle = device->handle;
307 acpi_driver_data(device) = button; 305 acpi_driver_data(device) = button;
308 306
309 /* 307 /*
@@ -362,7 +360,7 @@ static int acpi_button_add(struct acpi_device *device)
362 button); 360 button);
363 break; 361 break;
364 default: 362 default:
365 status = acpi_install_notify_handler(button->handle, 363 status = acpi_install_notify_handler(device->handle,
366 ACPI_DEVICE_NOTIFY, 364 ACPI_DEVICE_NOTIFY,
367 acpi_button_notify, 365 acpi_button_notify,
368 button); 366 button);
@@ -420,7 +418,7 @@ static int acpi_button_remove(struct acpi_device *device, int type)
420 acpi_button_notify_fixed); 418 acpi_button_notify_fixed);
421 break; 419 break;
422 default: 420 default:
423 status = acpi_remove_notify_handler(button->handle, 421 status = acpi_remove_notify_handler(device->handle,
424 ACPI_DEVICE_NOTIFY, 422 ACPI_DEVICE_NOTIFY,
425 acpi_button_notify); 423 acpi_button_notify);
426 break; 424 break;