diff options
author | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2006-09-17 12:17:19 -0400 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2006-09-17 12:19:31 -0400 |
commit | 9b4f2e9576658c4e52d95dc8d309f51b2e2db096 (patch) | |
tree | 7b1902b0f931783fccc6fee45c6f9c16b4fde5ce /drivers/acpi/fan.c | |
parent | 3c6c65f5ed5a6d307bd607aecd06d658c0934d88 (diff) | |
parent | 803db244b9f71102e366fd689000c1417b9a7508 (diff) |
ieee1394: merge from Linus
Conflicts: drivers/ieee1394/hosts.c
Patch "lockdep: annotate ieee1394 skb-queue-head locking" was meddling
with patch "ieee1394: fix kerneldoc of hpsb_alloc_host".
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/acpi/fan.c')
-rw-r--r-- | drivers/acpi/fan.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/acpi/fan.c b/drivers/acpi/fan.c index 38acc69b21bc..045c89477e59 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; |
@@ -120,7 +120,7 @@ acpi_fan_write_state(struct file *file, const char __user * buffer, | |||
120 | return count; | 120 | return count; |
121 | } | 121 | } |
122 | 122 | ||
123 | static struct file_operations acpi_fan_state_ops = { | 123 | static const struct file_operations acpi_fan_state_ops = { |
124 | .open = acpi_fan_state_open_fs, | 124 | .open = acpi_fan_state_open_fs, |
125 | .read = seq_read, | 125 | .read = seq_read, |
126 | .write = acpi_fan_write_state, | 126 | .write = acpi_fan_write_state, |
@@ -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; |