diff options
Diffstat (limited to 'drivers/acpi/fan.c')
-rw-r--r-- | drivers/acpi/fan.c | 37 |
1 files changed, 13 insertions, 24 deletions
diff --git a/drivers/acpi/fan.c b/drivers/acpi/fan.c index 14192ee55f8f..2ee1d061013f 100644 --- a/drivers/acpi/fan.c +++ b/drivers/acpi/fan.c | |||
@@ -37,11 +37,8 @@ | |||
37 | 37 | ||
38 | #define ACPI_FAN_COMPONENT 0x00200000 | 38 | #define ACPI_FAN_COMPONENT 0x00200000 |
39 | #define ACPI_FAN_CLASS "fan" | 39 | #define ACPI_FAN_CLASS "fan" |
40 | #define ACPI_FAN_HID "PNP0C0B" | ||
41 | #define ACPI_FAN_DRIVER_NAME "ACPI Fan Driver" | 40 | #define ACPI_FAN_DRIVER_NAME "ACPI Fan Driver" |
42 | #define ACPI_FAN_DEVICE_NAME "Fan" | ||
43 | #define ACPI_FAN_FILE_STATE "state" | 41 | #define ACPI_FAN_FILE_STATE "state" |
44 | #define ACPI_FAN_NOTIFY_STATUS 0x80 | ||
45 | 42 | ||
46 | #define _COMPONENT ACPI_FAN_COMPONENT | 43 | #define _COMPONENT ACPI_FAN_COMPONENT |
47 | ACPI_MODULE_NAME ("acpi_fan") | 44 | ACPI_MODULE_NAME ("acpi_fan") |
@@ -56,7 +53,7 @@ static int acpi_fan_remove (struct acpi_device *device, int type); | |||
56 | static struct acpi_driver acpi_fan_driver = { | 53 | static struct acpi_driver acpi_fan_driver = { |
57 | .name = ACPI_FAN_DRIVER_NAME, | 54 | .name = ACPI_FAN_DRIVER_NAME, |
58 | .class = ACPI_FAN_CLASS, | 55 | .class = ACPI_FAN_CLASS, |
59 | .ids = ACPI_FAN_HID, | 56 | .ids = "PNP0C0B", |
60 | .ops = { | 57 | .ops = { |
61 | .add = acpi_fan_add, | 58 | .add = acpi_fan_add, |
62 | .remove = acpi_fan_remove, | 59 | .remove = acpi_fan_remove, |
@@ -76,7 +73,7 @@ static struct proc_dir_entry *acpi_fan_dir; | |||
76 | 73 | ||
77 | 74 | ||
78 | static int | 75 | static int |
79 | acpi_fan_read_state (struct seq_file *seq, void *offset) | 76 | acpi_fan_read_state(struct seq_file *seq, void *offset) |
80 | { | 77 | { |
81 | struct acpi_fan *fan = seq->private; | 78 | struct acpi_fan *fan = seq->private; |
82 | int state = 0; | 79 | int state = 0; |
@@ -99,11 +96,8 @@ static int acpi_fan_state_open_fs(struct inode *inode, struct file *file) | |||
99 | } | 96 | } |
100 | 97 | ||
101 | static ssize_t | 98 | static ssize_t |
102 | acpi_fan_write_state ( | 99 | acpi_fan_write_state(struct file *file, const char __user *buffer, |
103 | struct file *file, | 100 | size_t count, loff_t *ppos) |
104 | const char __user *buffer, | ||
105 | size_t count, | ||
106 | loff_t *ppos) | ||
107 | { | 101 | { |
108 | int result = 0; | 102 | int result = 0; |
109 | struct seq_file *m = (struct seq_file *)file->private_data; | 103 | struct seq_file *m = (struct seq_file *)file->private_data; |
@@ -138,8 +132,7 @@ static struct file_operations acpi_fan_state_ops = { | |||
138 | }; | 132 | }; |
139 | 133 | ||
140 | static int | 134 | static int |
141 | acpi_fan_add_fs ( | 135 | acpi_fan_add_fs(struct acpi_device *device) |
142 | struct acpi_device *device) | ||
143 | { | 136 | { |
144 | struct proc_dir_entry *entry = NULL; | 137 | struct proc_dir_entry *entry = NULL; |
145 | 138 | ||
@@ -174,8 +167,7 @@ acpi_fan_add_fs ( | |||
174 | 167 | ||
175 | 168 | ||
176 | static int | 169 | static int |
177 | acpi_fan_remove_fs ( | 170 | acpi_fan_remove_fs(struct acpi_device *device) |
178 | struct acpi_device *device) | ||
179 | { | 171 | { |
180 | ACPI_FUNCTION_TRACE("acpi_fan_remove_fs"); | 172 | ACPI_FUNCTION_TRACE("acpi_fan_remove_fs"); |
181 | 173 | ||
@@ -195,8 +187,7 @@ acpi_fan_remove_fs ( | |||
195 | -------------------------------------------------------------------------- */ | 187 | -------------------------------------------------------------------------- */ |
196 | 188 | ||
197 | static int | 189 | static int |
198 | acpi_fan_add ( | 190 | acpi_fan_add(struct acpi_device *device) |
199 | struct acpi_device *device) | ||
200 | { | 191 | { |
201 | int result = 0; | 192 | int result = 0; |
202 | struct acpi_fan *fan = NULL; | 193 | struct acpi_fan *fan = NULL; |
@@ -213,7 +204,7 @@ acpi_fan_add ( | |||
213 | memset(fan, 0, sizeof(struct acpi_fan)); | 204 | memset(fan, 0, sizeof(struct acpi_fan)); |
214 | 205 | ||
215 | fan->handle = device->handle; | 206 | fan->handle = device->handle; |
216 | strcpy(acpi_device_name(device), ACPI_FAN_DEVICE_NAME); | 207 | strcpy(acpi_device_name(device), "Fan"); |
217 | strcpy(acpi_device_class(device), ACPI_FAN_CLASS); | 208 | strcpy(acpi_device_class(device), ACPI_FAN_CLASS); |
218 | acpi_driver_data(device) = fan; | 209 | acpi_driver_data(device) = fan; |
219 | 210 | ||
@@ -241,11 +232,9 @@ end: | |||
241 | 232 | ||
242 | 233 | ||
243 | static int | 234 | static int |
244 | acpi_fan_remove ( | 235 | acpi_fan_remove(struct acpi_device *device, int type) |
245 | struct acpi_device *device, | ||
246 | int type) | ||
247 | { | 236 | { |
248 | struct acpi_fan *fan = NULL; | 237 | struct acpi_fan *fan = NULL; |
249 | 238 | ||
250 | ACPI_FUNCTION_TRACE("acpi_fan_remove"); | 239 | ACPI_FUNCTION_TRACE("acpi_fan_remove"); |
251 | 240 | ||
@@ -263,9 +252,9 @@ acpi_fan_remove ( | |||
263 | 252 | ||
264 | 253 | ||
265 | static int __init | 254 | static int __init |
266 | acpi_fan_init (void) | 255 | acpi_fan_init(void) |
267 | { | 256 | { |
268 | int result = 0; | 257 | int result = 0; |
269 | 258 | ||
270 | ACPI_FUNCTION_TRACE("acpi_fan_init"); | 259 | ACPI_FUNCTION_TRACE("acpi_fan_init"); |
271 | 260 | ||
@@ -285,7 +274,7 @@ acpi_fan_init (void) | |||
285 | 274 | ||
286 | 275 | ||
287 | static void __exit | 276 | static void __exit |
288 | acpi_fan_exit (void) | 277 | acpi_fan_exit(void) |
289 | { | 278 | { |
290 | ACPI_FUNCTION_TRACE("acpi_fan_exit"); | 279 | ACPI_FUNCTION_TRACE("acpi_fan_exit"); |
291 | 280 | ||