summaryrefslogtreecommitdiff
path: root/drivers/acpi/fan.c
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2006-07-01 19:05:19 +0400
committerLen Brown <len.brown@intel.com>2006-07-01 19:05:19 +0400
commitb2f71bade430d468398167d696731bf770de2db8 (patch)
treeb804b0b21e722a42d5f2ee5edead8cab2e41be8b /drivers/acpi/fan.c
parentba290ab7dace8b3339c0cc86c221d48eed21e956 (diff)
parentd07a8577f695c807977af003b6e75f996e01a15f (diff)
downloadlinux-b2f71bade430d468398167d696731bf770de2db8.tar.xz
Pull acpi_device_handle_cleanup into release branch
Diffstat (limited to 'drivers/acpi/fan.c')
-rw-r--r--drivers/acpi/fan.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/acpi/fan.c b/drivers/acpi/fan.c
index 38acc69b21bc..daed2460924d 100644
--- a/drivers/acpi/fan.c
+++ b/drivers/acpi/fan.c
@@ -64,7 +64,7 @@ static struct acpi_driver acpi_fan_driver = {
};
struct acpi_fan {
- acpi_handle handle;
+ struct acpi_device * device;
};
/* --------------------------------------------------------------------------
@@ -80,7 +80,7 @@ static int acpi_fan_read_state(struct seq_file *seq, void *offset)
if (fan) {
- if (acpi_bus_get_power(fan->handle, &state))
+ if (acpi_bus_get_power(fan->device->handle, &state))
seq_printf(seq, "status: ERROR\n");
else
seq_printf(seq, "status: %s\n",
@@ -112,7 +112,7 @@ acpi_fan_write_state(struct file *file, const char __user * buffer,
state_string[count] = '\0';
- result = acpi_bus_set_power(fan->handle,
+ result = acpi_bus_set_power(fan->device->handle,
simple_strtoul(state_string, NULL, 0));
if (result)
return result;
@@ -191,12 +191,12 @@ static int acpi_fan_add(struct acpi_device *device)
return -ENOMEM;
memset(fan, 0, sizeof(struct acpi_fan));
- fan->handle = device->handle;
+ fan->device = device;
strcpy(acpi_device_name(device), "Fan");
strcpy(acpi_device_class(device), ACPI_FAN_CLASS);
acpi_driver_data(device) = fan;
- result = acpi_bus_get_power(fan->handle, &state);
+ result = acpi_bus_get_power(device->handle, &state);
if (result) {
printk(KERN_ERR PREFIX "Reading power state\n");
goto end;