diff options
Diffstat (limited to 'drivers/acpi/fan.c')
-rw-r--r-- | drivers/acpi/fan.c | 10 |
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 = { | |||
64 | }; | 64 | }; |
65 | 65 | ||
66 | struct acpi_fan { | 66 | struct acpi_fan { |
67 | acpi_handle handle; | 67 | struct acpi_device * device; |
68 | }; | 68 | }; |
69 | 69 | ||
70 | /* -------------------------------------------------------------------------- | 70 | /* -------------------------------------------------------------------------- |
@@ -80,7 +80,7 @@ static int acpi_fan_read_state(struct seq_file *seq, void *offset) | |||
80 | 80 | ||
81 | 81 | ||
82 | if (fan) { | 82 | if (fan) { |
83 | if (acpi_bus_get_power(fan->handle, &state)) | 83 | if (acpi_bus_get_power(fan->device->handle, &state)) |
84 | seq_printf(seq, "status: ERROR\n"); | 84 | seq_printf(seq, "status: ERROR\n"); |
85 | else | 85 | else |
86 | seq_printf(seq, "status: %s\n", | 86 | seq_printf(seq, "status: %s\n", |
@@ -112,7 +112,7 @@ acpi_fan_write_state(struct file *file, const char __user * buffer, | |||
112 | 112 | ||
113 | state_string[count] = '\0'; | 113 | state_string[count] = '\0'; |
114 | 114 | ||
115 | result = acpi_bus_set_power(fan->handle, | 115 | result = acpi_bus_set_power(fan->device->handle, |
116 | simple_strtoul(state_string, NULL, 0)); | 116 | simple_strtoul(state_string, NULL, 0)); |
117 | if (result) | 117 | if (result) |
118 | return result; | 118 | return result; |
@@ -191,12 +191,12 @@ static int acpi_fan_add(struct acpi_device *device) | |||
191 | return -ENOMEM; | 191 | return -ENOMEM; |
192 | memset(fan, 0, sizeof(struct acpi_fan)); | 192 | memset(fan, 0, sizeof(struct acpi_fan)); |
193 | 193 | ||
194 | fan->handle = device->handle; | 194 | fan->device = device; |
195 | strcpy(acpi_device_name(device), "Fan"); | 195 | strcpy(acpi_device_name(device), "Fan"); |
196 | strcpy(acpi_device_class(device), ACPI_FAN_CLASS); | 196 | strcpy(acpi_device_class(device), ACPI_FAN_CLASS); |
197 | acpi_driver_data(device) = fan; | 197 | acpi_driver_data(device) = fan; |
198 | 198 | ||
199 | result = acpi_bus_get_power(fan->handle, &state); | 199 | result = acpi_bus_get_power(device->handle, &state); |
200 | if (result) { | 200 | if (result) { |
201 | printk(KERN_ERR PREFIX "Reading power state\n"); | 201 | printk(KERN_ERR PREFIX "Reading power state\n"); |
202 | goto end; | 202 | goto end; |