diff options
author | Patrick Mochel <mochel@linux.intel.com> | 2006-05-19 16:54:41 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2006-06-30 02:42:04 -0400 |
commit | 3b073ec3667ee63e35b66752a30eeedef1e1e772 (patch) | |
tree | da718cc01a6ec044c8df373c7f4a919e8394af4d /drivers/acpi/battery.c | |
parent | b863278523f7adbacb9e34133f4b6397cdab9977 (diff) |
ACPI: battery: 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>
Diffstat (limited to 'drivers/acpi/battery.c')
-rw-r--r-- | drivers/acpi/battery.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c index ba34ca611d71..5de735ffc3e6 100644 --- a/drivers/acpi/battery.c +++ b/drivers/acpi/battery.c | |||
@@ -139,7 +139,7 @@ acpi_battery_get_info(struct acpi_battery *battery, | |||
139 | 139 | ||
140 | /* Evalute _BIF */ | 140 | /* Evalute _BIF */ |
141 | 141 | ||
142 | status = acpi_evaluate_object(battery->handle, "_BIF", NULL, &buffer); | 142 | status = acpi_evaluate_object(battery->device->handle, "_BIF", NULL, &buffer); |
143 | if (ACPI_FAILURE(status)) { | 143 | if (ACPI_FAILURE(status)) { |
144 | ACPI_EXCEPTION((AE_INFO, status, "Evaluating _BIF")); | 144 | ACPI_EXCEPTION((AE_INFO, status, "Evaluating _BIF")); |
145 | return -ENODEV; | 145 | return -ENODEV; |
@@ -199,7 +199,7 @@ acpi_battery_get_status(struct acpi_battery *battery, | |||
199 | 199 | ||
200 | /* Evalute _BST */ | 200 | /* Evalute _BST */ |
201 | 201 | ||
202 | status = acpi_evaluate_object(battery->handle, "_BST", NULL, &buffer); | 202 | status = acpi_evaluate_object(battery->device->handle, "_BST", NULL, &buffer); |
203 | if (ACPI_FAILURE(status)) { | 203 | if (ACPI_FAILURE(status)) { |
204 | ACPI_EXCEPTION((AE_INFO, status, "Evaluating _BST")); | 204 | ACPI_EXCEPTION((AE_INFO, status, "Evaluating _BST")); |
205 | return -ENODEV; | 205 | return -ENODEV; |
@@ -256,7 +256,7 @@ acpi_battery_set_alarm(struct acpi_battery *battery, unsigned long alarm) | |||
256 | 256 | ||
257 | arg0.integer.value = alarm; | 257 | arg0.integer.value = alarm; |
258 | 258 | ||
259 | status = acpi_evaluate_object(battery->handle, "_BTP", &arg_list, NULL); | 259 | status = acpi_evaluate_object(battery->device->handle, "_BTP", &arg_list, NULL); |
260 | if (ACPI_FAILURE(status)) | 260 | if (ACPI_FAILURE(status)) |
261 | return -ENODEV; | 261 | return -ENODEV; |
262 | 262 | ||
@@ -304,7 +304,7 @@ static int acpi_battery_check(struct acpi_battery *battery) | |||
304 | 304 | ||
305 | /* See if alarms are supported, and if so, set default */ | 305 | /* See if alarms are supported, and if so, set default */ |
306 | 306 | ||
307 | status = acpi_get_handle(battery->handle, "_BTP", &handle); | 307 | status = acpi_get_handle(battery->device->handle, "_BTP", &handle); |
308 | if (ACPI_SUCCESS(status)) { | 308 | if (ACPI_SUCCESS(status)) { |
309 | battery->flags.alarm = 1; | 309 | battery->flags.alarm = 1; |
310 | acpi_battery_set_alarm(battery, battery->trips.warning); | 310 | acpi_battery_set_alarm(battery, battery->trips.warning); |
@@ -707,7 +707,7 @@ static int acpi_battery_add(struct acpi_device *device) | |||
707 | if (result) | 707 | if (result) |
708 | goto end; | 708 | goto end; |
709 | 709 | ||
710 | status = acpi_install_notify_handler(battery->handle, | 710 | status = acpi_install_notify_handler(device->handle, |
711 | ACPI_DEVICE_NOTIFY, | 711 | ACPI_DEVICE_NOTIFY, |
712 | acpi_battery_notify, battery); | 712 | acpi_battery_notify, battery); |
713 | if (ACPI_FAILURE(status)) { | 713 | if (ACPI_FAILURE(status)) { |
@@ -739,7 +739,7 @@ static int acpi_battery_remove(struct acpi_device *device, int type) | |||
739 | 739 | ||
740 | battery = (struct acpi_battery *)acpi_driver_data(device); | 740 | battery = (struct acpi_battery *)acpi_driver_data(device); |
741 | 741 | ||
742 | status = acpi_remove_notify_handler(battery->handle, | 742 | status = acpi_remove_notify_handler(device->handle, |
743 | ACPI_DEVICE_NOTIFY, | 743 | ACPI_DEVICE_NOTIFY, |
744 | acpi_battery_notify); | 744 | acpi_battery_notify); |
745 | 745 | ||