diff options
author | Pavel Machek <pavel@suze.cz> | 2005-08-05 00:37:45 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2005-08-05 00:38:58 -0400 |
commit | c65ade4dc8b486e8c8b9b0a6399789a5428e2039 (patch) | |
tree | b12aa0cce89523e67e9c5a74343e195c797636d5 | |
parent | 1d492eb41371d9a5145651e8eb64bea1042a4057 (diff) |
[ACPI] whitespace
Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Len Brown <len.brown@intel.com>
-rw-r--r-- | drivers/acpi/event.c | 18 | ||||
-rw-r--r-- | drivers/acpi/fan.c | 37 | ||||
-rw-r--r-- | drivers/acpi/pci_link.c | 10 | ||||
-rw-r--r-- | drivers/acpi/sleep/proc.c | 34 |
4 files changed, 32 insertions, 67 deletions
diff --git a/drivers/acpi/event.c b/drivers/acpi/event.c index 43c49f66a328..ce8d3eec3911 100644 --- a/drivers/acpi/event.c +++ b/drivers/acpi/event.c | |||
@@ -24,27 +24,23 @@ extern wait_queue_head_t acpi_bus_event_queue; | |||
24 | static int | 24 | static int |
25 | acpi_system_open_event(struct inode *inode, struct file *file) | 25 | acpi_system_open_event(struct inode *inode, struct file *file) |
26 | { | 26 | { |
27 | spin_lock_irq (&acpi_system_event_lock); | 27 | spin_lock_irq(&acpi_system_event_lock); |
28 | 28 | ||
29 | if(event_is_open) | 29 | if (event_is_open) |
30 | goto out_busy; | 30 | goto out_busy; |
31 | 31 | ||
32 | event_is_open = 1; | 32 | event_is_open = 1; |
33 | 33 | ||
34 | spin_unlock_irq (&acpi_system_event_lock); | 34 | spin_unlock_irq(&acpi_system_event_lock); |
35 | return 0; | 35 | return 0; |
36 | 36 | ||
37 | out_busy: | 37 | out_busy: |
38 | spin_unlock_irq (&acpi_system_event_lock); | 38 | spin_unlock_irq(&acpi_system_event_lock); |
39 | return -EBUSY; | 39 | return -EBUSY; |
40 | } | 40 | } |
41 | 41 | ||
42 | static ssize_t | 42 | static ssize_t |
43 | acpi_system_read_event ( | 43 | acpi_system_read_event(struct file *file, char __user *buffer, size_t count, loff_t *ppos) |
44 | struct file *file, | ||
45 | char __user *buffer, | ||
46 | size_t count, | ||
47 | loff_t *ppos) | ||
48 | { | 44 | { |
49 | int result = 0; | 45 | int result = 0; |
50 | struct acpi_bus_event event; | 46 | struct acpi_bus_event event; |
@@ -98,9 +94,7 @@ acpi_system_close_event(struct inode *inode, struct file *file) | |||
98 | } | 94 | } |
99 | 95 | ||
100 | static unsigned int | 96 | static unsigned int |
101 | acpi_system_poll_event( | 97 | acpi_system_poll_event(struct file *file, poll_table *wait) |
102 | struct file *file, | ||
103 | poll_table *wait) | ||
104 | { | 98 | { |
105 | poll_wait(file, &acpi_bus_event_queue, wait); | 99 | poll_wait(file, &acpi_bus_event_queue, wait); |
106 | if (!list_empty(&acpi_bus_event_list)) | 100 | if (!list_empty(&acpi_bus_event_list)) |
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 | ||
diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c index 26aa3829f1de..e8334ce84d84 100644 --- a/drivers/acpi/pci_link.c +++ b/drivers/acpi/pci_link.c | |||
@@ -529,8 +529,7 @@ acpi_irq_penalty_init(void) | |||
529 | 529 | ||
530 | static int acpi_irq_balance; /* 0: static, 1: balance */ | 530 | static int acpi_irq_balance; /* 0: static, 1: balance */ |
531 | 531 | ||
532 | static int acpi_pci_link_allocate( | 532 | static int acpi_pci_link_allocate(struct acpi_pci_link *link) |
533 | struct acpi_pci_link *link) | ||
534 | { | 533 | { |
535 | int irq; | 534 | int irq; |
536 | int i; | 535 | int i; |
@@ -718,8 +717,7 @@ acpi_pci_link_free_irq(acpi_handle handle) | |||
718 | -------------------------------------------------------------------------- */ | 717 | -------------------------------------------------------------------------- */ |
719 | 718 | ||
720 | static int | 719 | static int |
721 | acpi_pci_link_add ( | 720 | acpi_pci_link_add(struct acpi_device *device) |
722 | struct acpi_device *device) | ||
723 | { | 721 | { |
724 | int result = 0; | 722 | int result = 0; |
725 | struct acpi_pci_link *link = NULL; | 723 | struct acpi_pci_link *link = NULL; |
@@ -827,9 +825,7 @@ irqrouter_resume(struct sys_device *dev) | |||
827 | 825 | ||
828 | 826 | ||
829 | static int | 827 | static int |
830 | acpi_pci_link_remove ( | 828 | acpi_pci_link_remove(struct acpi_device *device, int type) |
831 | struct acpi_device *device, | ||
832 | int type) | ||
833 | { | 829 | { |
834 | struct acpi_pci_link *link = NULL; | 830 | struct acpi_pci_link *link = NULL; |
835 | 831 | ||
diff --git a/drivers/acpi/sleep/proc.c b/drivers/acpi/sleep/proc.c index 1be99f0996d6..a962fc24f704 100644 --- a/drivers/acpi/sleep/proc.c +++ b/drivers/acpi/sleep/proc.c | |||
@@ -13,13 +13,6 @@ | |||
13 | 13 | ||
14 | #include "sleep.h" | 14 | #include "sleep.h" |
15 | 15 | ||
16 | #ifdef CONFIG_ACPI_SLEEP_PROC_SLEEP | ||
17 | #define ACPI_SYSTEM_FILE_SLEEP "sleep" | ||
18 | #endif | ||
19 | |||
20 | #define ACPI_SYSTEM_FILE_ALARM "alarm" | ||
21 | #define ACPI_SYSTEM_FILE_WAKEUP_DEVICE "wakeup" | ||
22 | |||
23 | #define _COMPONENT ACPI_SYSTEM_COMPONENT | 16 | #define _COMPONENT ACPI_SYSTEM_COMPONENT |
24 | ACPI_MODULE_NAME ("sleep") | 17 | ACPI_MODULE_NAME ("sleep") |
25 | 18 | ||
@@ -378,14 +371,10 @@ acpi_system_wakeup_device_seq_show(struct seq_file *seq, void *offset) | |||
378 | if (!dev->wakeup.flags.valid) | 371 | if (!dev->wakeup.flags.valid) |
379 | continue; | 372 | continue; |
380 | spin_unlock(&acpi_device_lock); | 373 | spin_unlock(&acpi_device_lock); |
381 | if (dev->wakeup.flags.run_wake) | 374 | seq_printf(seq, "%4s %4d %s%8s\n", |
382 | seq_printf(seq, "%4s %4d %8s\n", | 375 | dev->pnp.bus_id, (u32) dev->wakeup.sleep_state, |
383 | dev->pnp.bus_id, (u32) dev->wakeup.sleep_state, | 376 | dev->wakeup.flags.run_wake ? "*" : "", |
384 | dev->wakeup.state.enabled ? "*enabled" : "*disabled"); | 377 | dev->wakeup.state.enabled ? "enabled" : "disabled"); |
385 | else | ||
386 | seq_printf(seq, "%4s %4d %8s\n", | ||
387 | dev->pnp.bus_id, (u32) dev->wakeup.sleep_state, | ||
388 | dev->wakeup.state.enabled ? "enabled" : "disabled"); | ||
389 | spin_lock(&acpi_device_lock); | 378 | spin_lock(&acpi_device_lock); |
390 | } | 379 | } |
391 | spin_unlock(&acpi_device_lock); | 380 | spin_unlock(&acpi_device_lock); |
@@ -486,28 +475,25 @@ static u32 rtc_handler(void * context) | |||
486 | 475 | ||
487 | static int acpi_sleep_proc_init(void) | 476 | static int acpi_sleep_proc_init(void) |
488 | { | 477 | { |
489 | struct proc_dir_entry *entry = NULL; | 478 | struct proc_dir_entry *entry = NULL; |
490 | 479 | ||
491 | if (acpi_disabled) | 480 | if (acpi_disabled) |
492 | return 0; | 481 | return 0; |
493 | 482 | ||
494 | #ifdef CONFIG_ACPI_SLEEP_PROC_SLEEP | 483 | #ifdef CONFIG_ACPI_SLEEP_PROC_SLEEP |
495 | /* 'sleep' [R/W]*/ | 484 | /* 'sleep' [R/W] */ |
496 | entry = create_proc_entry(ACPI_SYSTEM_FILE_SLEEP, | 485 | entry = create_proc_entry("sleep", S_IFREG|S_IRUGO|S_IWUSR, acpi_root_dir); |
497 | S_IFREG|S_IRUGO|S_IWUSR, acpi_root_dir); | ||
498 | if (entry) | 486 | if (entry) |
499 | entry->proc_fops = &acpi_system_sleep_fops; | 487 | entry->proc_fops = &acpi_system_sleep_fops; |
500 | #endif | 488 | #endif |
501 | 489 | ||
502 | /* 'alarm' [R/W] */ | 490 | /* 'alarm' [R/W] */ |
503 | entry = create_proc_entry(ACPI_SYSTEM_FILE_ALARM, | 491 | entry = create_proc_entry("alarm", S_IFREG|S_IRUGO|S_IWUSR, acpi_root_dir); |
504 | S_IFREG|S_IRUGO|S_IWUSR, acpi_root_dir); | ||
505 | if (entry) | 492 | if (entry) |
506 | entry->proc_fops = &acpi_system_alarm_fops; | 493 | entry->proc_fops = &acpi_system_alarm_fops; |
507 | 494 | ||
508 | /* 'wakeup device' [R/W]*/ | 495 | /* 'wakeup device' [R/W] */ |
509 | entry = create_proc_entry(ACPI_SYSTEM_FILE_WAKEUP_DEVICE, | 496 | entry = create_proc_entry("wakeup", S_IFREG|S_IRUGO|S_IWUSR, acpi_root_dir); |
510 | S_IFREG|S_IRUGO|S_IWUSR, acpi_root_dir); | ||
511 | if (entry) | 497 | if (entry) |
512 | entry->proc_fops = &acpi_system_wakeup_device_fops; | 498 | entry->proc_fops = &acpi_system_wakeup_device_fops; |
513 | 499 | ||