Commit dc8c2b27 authored by Patrick Mochel's avatar Patrick Mochel Committed by Len Brown

ACPI: fan: 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 27b1d3e8
...@@ -81,7 +81,7 @@ static int acpi_fan_read_state(struct seq_file *seq, void *offset) ...@@ -81,7 +81,7 @@ static int acpi_fan_read_state(struct seq_file *seq, void *offset)
if (fan) { 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"); seq_printf(seq, "status: ERROR\n");
else else
seq_printf(seq, "status: %s\n", seq_printf(seq, "status: %s\n",
...@@ -113,7 +113,7 @@ acpi_fan_write_state(struct file *file, const char __user * buffer, ...@@ -113,7 +113,7 @@ acpi_fan_write_state(struct file *file, const char __user * buffer,
state_string[count] = '\0'; 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)); simple_strtoul(state_string, NULL, 0));
if (result) if (result)
return result; return result;
...@@ -198,7 +198,7 @@ static int acpi_fan_add(struct acpi_device *device) ...@@ -198,7 +198,7 @@ static int acpi_fan_add(struct acpi_device *device)
strcpy(acpi_device_class(device), ACPI_FAN_CLASS); strcpy(acpi_device_class(device), ACPI_FAN_CLASS);
acpi_driver_data(device) = fan; acpi_driver_data(device) = fan;
result = acpi_bus_get_power(fan->handle, &state); result = acpi_bus_get_power(device->handle, &state);
if (result) { if (result) {
printk(KERN_ERR PREFIX "Reading power state\n"); printk(KERN_ERR PREFIX "Reading power state\n");
goto end; goto end;
......
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