diff options
-rw-r--r-- | Documentation/laptops/asus-laptop.txt | 8 | ||||
-rw-r--r-- | Documentation/laptops/sony-laptop.txt | 8 | ||||
-rw-r--r-- | drivers/acpi/Kconfig | 18 | ||||
-rw-r--r-- | drivers/acpi/ac.c | 1 | ||||
-rw-r--r-- | drivers/acpi/acpi_pad.c | 1 | ||||
-rw-r--r-- | drivers/acpi/battery.c | 2 | ||||
-rw-r--r-- | drivers/acpi/bus.c | 98 | ||||
-rw-r--r-- | drivers/acpi/button.c | 2 | ||||
-rw-r--r-- | drivers/acpi/event.c | 106 | ||||
-rw-r--r-- | drivers/acpi/processor_driver.c | 4 | ||||
-rw-r--r-- | drivers/acpi/sbs.c | 15 | ||||
-rw-r--r-- | drivers/acpi/thermal.c | 3 | ||||
-rw-r--r-- | drivers/acpi/video.c | 10 | ||||
-rw-r--r-- | drivers/char/sonypi.c | 5 | ||||
-rw-r--r-- | drivers/pci/hotplug/acpiphp_ibm.c | 1 | ||||
-rw-r--r-- | drivers/platform/x86/asus-laptop.c | 1 | ||||
-rw-r--r-- | drivers/platform/x86/eeepc-laptop.c | 1 | ||||
-rw-r--r-- | drivers/platform/x86/fujitsu-laptop.c | 4 | ||||
-rw-r--r-- | drivers/platform/x86/panasonic-laptop.c | 3 | ||||
-rw-r--r-- | drivers/platform/x86/sony-laptop.c | 4 | ||||
-rw-r--r-- | drivers/platform/x86/thinkpad_acpi.c | 11 | ||||
-rw-r--r-- | include/acpi/acpi_bus.h | 9 |
22 files changed, 10 insertions, 305 deletions
diff --git a/Documentation/laptops/asus-laptop.txt b/Documentation/laptops/asus-laptop.txt index 69f9fb3701e0..79a1bc675a8d 100644 --- a/Documentation/laptops/asus-laptop.txt +++ b/Documentation/laptops/asus-laptop.txt | |||
@@ -8,8 +8,8 @@ http://acpi4asus.sf.net/ | |||
8 | 8 | ||
9 | This driver provides support for extra features of ACPI-compatible ASUS laptops. | 9 | This driver provides support for extra features of ACPI-compatible ASUS laptops. |
10 | It may also support some MEDION, JVC or VICTOR laptops (such as MEDION 9675 or | 10 | It may also support some MEDION, JVC or VICTOR laptops (such as MEDION 9675 or |
11 | VICTOR XP7210 for example). It makes all the extra buttons generate standard | 11 | VICTOR XP7210 for example). It makes all the extra buttons generate input |
12 | ACPI events that go through /proc/acpi/events and input events (like keyboards). | 12 | events (like keyboards). |
13 | On some models adds support for changing the display brightness and output, | 13 | On some models adds support for changing the display brightness and output, |
14 | switching the LCD backlight on and off, and most importantly, allows you to | 14 | switching the LCD backlight on and off, and most importantly, allows you to |
15 | blink those fancy LEDs intended for reporting mail and wireless status. | 15 | blink those fancy LEDs intended for reporting mail and wireless status. |
@@ -55,8 +55,8 @@ Usage | |||
55 | DSDT) to me. | 55 | DSDT) to me. |
56 | 56 | ||
57 | That's all, now, all the events generated by the hotkeys of your laptop | 57 | That's all, now, all the events generated by the hotkeys of your laptop |
58 | should be reported in your /proc/acpi/event entry. You can check with | 58 | should be reported via netlink events. You can check with |
59 | "acpi_listen". | 59 | "acpi_genl monitor" (part of the acpica project). |
60 | 60 | ||
61 | Hotkeys are also reported as input keys (like keyboards) you can check | 61 | Hotkeys are also reported as input keys (like keyboards) you can check |
62 | which key are supported using "xev" under X11. | 62 | which key are supported using "xev" under X11. |
diff --git a/Documentation/laptops/sony-laptop.txt b/Documentation/laptops/sony-laptop.txt index 0d5ac7f5287e..978b1e615155 100644 --- a/Documentation/laptops/sony-laptop.txt +++ b/Documentation/laptops/sony-laptop.txt | |||
@@ -12,10 +12,10 @@ Fn keys (hotkeys): | |||
12 | ------------------ | 12 | ------------------ |
13 | Some models report hotkeys through the SNC or SPIC devices, such events are | 13 | Some models report hotkeys through the SNC or SPIC devices, such events are |
14 | reported both through the ACPI subsystem as acpi events and through the INPUT | 14 | reported both through the ACPI subsystem as acpi events and through the INPUT |
15 | subsystem. See the logs of acpid or /proc/acpi/event and | 15 | subsystem. See the logs of /proc/bus/input/devices to find out what those |
16 | /proc/bus/input/devices to find out what those events are and which input | 16 | events are and which input devices are created by the driver. |
17 | devices are created by the driver. Additionally, loading the driver with the | 17 | Additionally, loading the driver with the debug option will report all events |
18 | debug option will report all events in the kernel log. | 18 | in the kernel log. |
19 | 19 | ||
20 | The "scancodes" passed to the input system (that can be remapped with udev) | 20 | The "scancodes" passed to the input system (that can be remapped with udev) |
21 | are indexes to the table "sony_laptop_input_keycode_map" in the sony-laptop.c | 21 | are indexes to the table "sony_laptop_input_keycode_map" in the sony-laptop.c |
diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig index 100bd724f648..3278a210c435 100644 --- a/drivers/acpi/Kconfig +++ b/drivers/acpi/Kconfig | |||
@@ -91,24 +91,6 @@ config ACPI_EC_DEBUGFS | |||
91 | Thus this option is a debug option that helps to write ACPI drivers | 91 | Thus this option is a debug option that helps to write ACPI drivers |
92 | and can be used to identify ACPI code or EC firmware bugs. | 92 | and can be used to identify ACPI code or EC firmware bugs. |
93 | 93 | ||
94 | config ACPI_PROC_EVENT | ||
95 | bool "Deprecated /proc/acpi/event support" | ||
96 | depends on PROC_FS | ||
97 | default y | ||
98 | help | ||
99 | A user-space daemon, acpid, typically reads /proc/acpi/event | ||
100 | and handles all ACPI-generated events. | ||
101 | |||
102 | These events are now delivered to user-space either | ||
103 | via the input layer or as netlink events. | ||
104 | |||
105 | This build option enables the old code for legacy | ||
106 | user-space implementation. After some time, this will | ||
107 | be moved under CONFIG_ACPI_PROCFS, and then deleted. | ||
108 | |||
109 | Say Y here to retain the old behaviour. Say N if your | ||
110 | user-space is newer than kernel 2.6.23 (September 2007). | ||
111 | |||
112 | config ACPI_AC | 94 | config ACPI_AC |
113 | tristate "AC Adapter" | 95 | tristate "AC Adapter" |
114 | depends on X86 | 96 | depends on X86 |
diff --git a/drivers/acpi/ac.c b/drivers/acpi/ac.c index 4f4e741d34b2..f37beaa32750 100644 --- a/drivers/acpi/ac.c +++ b/drivers/acpi/ac.c | |||
@@ -267,7 +267,6 @@ static void acpi_ac_notify(struct acpi_device *device, u32 event) | |||
267 | msleep(ac_sleep_before_get_state_ms); | 267 | msleep(ac_sleep_before_get_state_ms); |
268 | 268 | ||
269 | acpi_ac_get_state(ac); | 269 | acpi_ac_get_state(ac); |
270 | acpi_bus_generate_proc_event(device, event, (u32) ac->state); | ||
271 | acpi_bus_generate_netlink_event(device->pnp.device_class, | 270 | acpi_bus_generate_netlink_event(device->pnp.device_class, |
272 | dev_name(&device->dev), event, | 271 | dev_name(&device->dev), event, |
273 | (u32) ac->state); | 272 | (u32) ac->state); |
diff --git a/drivers/acpi/acpi_pad.c b/drivers/acpi/acpi_pad.c index 27bb6a91de5f..6230637054c6 100644 --- a/drivers/acpi/acpi_pad.c +++ b/drivers/acpi/acpi_pad.c | |||
@@ -452,7 +452,6 @@ static void acpi_pad_notify(acpi_handle handle, u32 event, | |||
452 | switch (event) { | 452 | switch (event) { |
453 | case ACPI_PROCESSOR_AGGREGATOR_NOTIFY: | 453 | case ACPI_PROCESSOR_AGGREGATOR_NOTIFY: |
454 | acpi_pad_handle_notify(handle); | 454 | acpi_pad_handle_notify(handle); |
455 | acpi_bus_generate_proc_event(device, event, 0); | ||
456 | acpi_bus_generate_netlink_event(device->pnp.device_class, | 455 | acpi_bus_generate_netlink_event(device->pnp.device_class, |
457 | dev_name(&device->dev), event, 0); | 456 | dev_name(&device->dev), event, 0); |
458 | break; | 457 | break; |
diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c index 082b4dd252a8..33dfa851899d 100644 --- a/drivers/acpi/battery.c +++ b/drivers/acpi/battery.c | |||
@@ -1034,8 +1034,6 @@ static void acpi_battery_notify(struct acpi_device *device, u32 event) | |||
1034 | if (event == ACPI_BATTERY_NOTIFY_INFO) | 1034 | if (event == ACPI_BATTERY_NOTIFY_INFO) |
1035 | acpi_battery_refresh(battery); | 1035 | acpi_battery_refresh(battery); |
1036 | acpi_battery_update(battery); | 1036 | acpi_battery_update(battery); |
1037 | acpi_bus_generate_proc_event(device, event, | ||
1038 | acpi_battery_present(battery)); | ||
1039 | acpi_bus_generate_netlink_event(device->pnp.device_class, | 1037 | acpi_bus_generate_netlink_event(device->pnp.device_class, |
1040 | dev_name(&device->dev), event, | 1038 | dev_name(&device->dev), event, |
1041 | acpi_battery_present(battery)); | 1039 | acpi_battery_present(battery)); |
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index a5bb33bab448..b6e9a3786e2d 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c | |||
@@ -346,104 +346,6 @@ static void acpi_bus_osc_support(void) | |||
346 | } | 346 | } |
347 | 347 | ||
348 | /* -------------------------------------------------------------------------- | 348 | /* -------------------------------------------------------------------------- |
349 | Event Management | ||
350 | -------------------------------------------------------------------------- */ | ||
351 | |||
352 | #ifdef CONFIG_ACPI_PROC_EVENT | ||
353 | static DEFINE_SPINLOCK(acpi_bus_event_lock); | ||
354 | |||
355 | LIST_HEAD(acpi_bus_event_list); | ||
356 | DECLARE_WAIT_QUEUE_HEAD(acpi_bus_event_queue); | ||
357 | |||
358 | extern int event_is_open; | ||
359 | |||
360 | int acpi_bus_generate_proc_event4(const char *device_class, const char *bus_id, u8 type, int data) | ||
361 | { | ||
362 | struct acpi_bus_event *event; | ||
363 | unsigned long flags; | ||
364 | |||
365 | /* drop event on the floor if no one's listening */ | ||
366 | if (!event_is_open) | ||
367 | return 0; | ||
368 | |||
369 | event = kzalloc(sizeof(struct acpi_bus_event), GFP_ATOMIC); | ||
370 | if (!event) | ||
371 | return -ENOMEM; | ||
372 | |||
373 | strcpy(event->device_class, device_class); | ||
374 | strcpy(event->bus_id, bus_id); | ||
375 | event->type = type; | ||
376 | event->data = data; | ||
377 | |||
378 | spin_lock_irqsave(&acpi_bus_event_lock, flags); | ||
379 | list_add_tail(&event->node, &acpi_bus_event_list); | ||
380 | spin_unlock_irqrestore(&acpi_bus_event_lock, flags); | ||
381 | |||
382 | wake_up_interruptible(&acpi_bus_event_queue); | ||
383 | |||
384 | return 0; | ||
385 | |||
386 | } | ||
387 | |||
388 | EXPORT_SYMBOL_GPL(acpi_bus_generate_proc_event4); | ||
389 | |||
390 | int acpi_bus_generate_proc_event(struct acpi_device *device, u8 type, int data) | ||
391 | { | ||
392 | if (!device) | ||
393 | return -EINVAL; | ||
394 | return acpi_bus_generate_proc_event4(device->pnp.device_class, | ||
395 | device->pnp.bus_id, type, data); | ||
396 | } | ||
397 | |||
398 | EXPORT_SYMBOL(acpi_bus_generate_proc_event); | ||
399 | |||
400 | int acpi_bus_receive_event(struct acpi_bus_event *event) | ||
401 | { | ||
402 | unsigned long flags; | ||
403 | struct acpi_bus_event *entry = NULL; | ||
404 | |||
405 | DECLARE_WAITQUEUE(wait, current); | ||
406 | |||
407 | |||
408 | if (!event) | ||
409 | return -EINVAL; | ||
410 | |||
411 | if (list_empty(&acpi_bus_event_list)) { | ||
412 | |||
413 | set_current_state(TASK_INTERRUPTIBLE); | ||
414 | add_wait_queue(&acpi_bus_event_queue, &wait); | ||
415 | |||
416 | if (list_empty(&acpi_bus_event_list)) | ||
417 | schedule(); | ||
418 | |||
419 | remove_wait_queue(&acpi_bus_event_queue, &wait); | ||
420 | set_current_state(TASK_RUNNING); | ||
421 | |||
422 | if (signal_pending(current)) | ||
423 | return -ERESTARTSYS; | ||
424 | } | ||
425 | |||
426 | spin_lock_irqsave(&acpi_bus_event_lock, flags); | ||
427 | if (!list_empty(&acpi_bus_event_list)) { | ||
428 | entry = list_entry(acpi_bus_event_list.next, | ||
429 | struct acpi_bus_event, node); | ||
430 | list_del(&entry->node); | ||
431 | } | ||
432 | spin_unlock_irqrestore(&acpi_bus_event_lock, flags); | ||
433 | |||
434 | if (!entry) | ||
435 | return -ENODEV; | ||
436 | |||
437 | memcpy(event, entry, sizeof(struct acpi_bus_event)); | ||
438 | |||
439 | kfree(entry); | ||
440 | |||
441 | return 0; | ||
442 | } | ||
443 | |||
444 | #endif /* CONFIG_ACPI_PROC_EVENT */ | ||
445 | |||
446 | /* -------------------------------------------------------------------------- | ||
447 | Notification Handling | 349 | Notification Handling |
448 | -------------------------------------------------------------------------- */ | 350 | -------------------------------------------------------------------------- */ |
449 | 351 | ||
diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c index d2e617b5b3f6..a55773801c5f 100644 --- a/drivers/acpi/button.c +++ b/drivers/acpi/button.c | |||
@@ -303,8 +303,6 @@ static void acpi_button_notify(struct acpi_device *device, u32 event) | |||
303 | 303 | ||
304 | pm_wakeup_event(&device->dev, 0); | 304 | pm_wakeup_event(&device->dev, 0); |
305 | } | 305 | } |
306 | |||
307 | acpi_bus_generate_proc_event(device, event, ++button->pushed); | ||
308 | break; | 306 | break; |
309 | default: | 307 | default: |
310 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, | 308 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, |
diff --git a/drivers/acpi/event.c b/drivers/acpi/event.c index 1442737cedec..8247fcdde079 100644 --- a/drivers/acpi/event.c +++ b/drivers/acpi/event.c | |||
@@ -21,100 +21,6 @@ | |||
21 | #define _COMPONENT ACPI_SYSTEM_COMPONENT | 21 | #define _COMPONENT ACPI_SYSTEM_COMPONENT |
22 | ACPI_MODULE_NAME("event"); | 22 | ACPI_MODULE_NAME("event"); |
23 | 23 | ||
24 | #ifdef CONFIG_ACPI_PROC_EVENT | ||
25 | /* Global vars for handling event proc entry */ | ||
26 | static DEFINE_SPINLOCK(acpi_system_event_lock); | ||
27 | int event_is_open = 0; | ||
28 | extern struct list_head acpi_bus_event_list; | ||
29 | extern wait_queue_head_t acpi_bus_event_queue; | ||
30 | |||
31 | static int acpi_system_open_event(struct inode *inode, struct file *file) | ||
32 | { | ||
33 | spin_lock_irq(&acpi_system_event_lock); | ||
34 | |||
35 | if (event_is_open) | ||
36 | goto out_busy; | ||
37 | |||
38 | event_is_open = 1; | ||
39 | |||
40 | spin_unlock_irq(&acpi_system_event_lock); | ||
41 | return 0; | ||
42 | |||
43 | out_busy: | ||
44 | spin_unlock_irq(&acpi_system_event_lock); | ||
45 | return -EBUSY; | ||
46 | } | ||
47 | |||
48 | static ssize_t | ||
49 | acpi_system_read_event(struct file *file, char __user * buffer, size_t count, | ||
50 | loff_t * ppos) | ||
51 | { | ||
52 | int result = 0; | ||
53 | struct acpi_bus_event event; | ||
54 | static char str[ACPI_MAX_STRING]; | ||
55 | static int chars_remaining = 0; | ||
56 | static char *ptr; | ||
57 | |||
58 | if (!chars_remaining) { | ||
59 | memset(&event, 0, sizeof(struct acpi_bus_event)); | ||
60 | |||
61 | if ((file->f_flags & O_NONBLOCK) | ||
62 | && (list_empty(&acpi_bus_event_list))) | ||
63 | return -EAGAIN; | ||
64 | |||
65 | result = acpi_bus_receive_event(&event); | ||
66 | if (result) | ||
67 | return result; | ||
68 | |||
69 | chars_remaining = sprintf(str, "%s %s %08x %08x\n", | ||
70 | event.device_class ? event. | ||
71 | device_class : "<unknown>", | ||
72 | event.bus_id ? event. | ||
73 | bus_id : "<unknown>", event.type, | ||
74 | event.data); | ||
75 | ptr = str; | ||
76 | } | ||
77 | |||
78 | if (chars_remaining < count) { | ||
79 | count = chars_remaining; | ||
80 | } | ||
81 | |||
82 | if (copy_to_user(buffer, ptr, count)) | ||
83 | return -EFAULT; | ||
84 | |||
85 | *ppos += count; | ||
86 | chars_remaining -= count; | ||
87 | ptr += count; | ||
88 | |||
89 | return count; | ||
90 | } | ||
91 | |||
92 | static int acpi_system_close_event(struct inode *inode, struct file *file) | ||
93 | { | ||
94 | spin_lock_irq(&acpi_system_event_lock); | ||
95 | event_is_open = 0; | ||
96 | spin_unlock_irq(&acpi_system_event_lock); | ||
97 | return 0; | ||
98 | } | ||
99 | |||
100 | static unsigned int acpi_system_poll_event(struct file *file, poll_table * wait) | ||
101 | { | ||
102 | poll_wait(file, &acpi_bus_event_queue, wait); | ||
103 | if (!list_empty(&acpi_bus_event_list)) | ||
104 | return POLLIN | POLLRDNORM; | ||
105 | return 0; | ||
106 | } | ||
107 | |||
108 | static const struct file_operations acpi_system_event_ops = { | ||
109 | .owner = THIS_MODULE, | ||
110 | .open = acpi_system_open_event, | ||
111 | .read = acpi_system_read_event, | ||
112 | .release = acpi_system_close_event, | ||
113 | .poll = acpi_system_poll_event, | ||
114 | .llseek = default_llseek, | ||
115 | }; | ||
116 | #endif /* CONFIG_ACPI_PROC_EVENT */ | ||
117 | |||
118 | /* ACPI notifier chain */ | 24 | /* ACPI notifier chain */ |
119 | static BLOCKING_NOTIFIER_HEAD(acpi_chain_head); | 25 | static BLOCKING_NOTIFIER_HEAD(acpi_chain_head); |
120 | 26 | ||
@@ -280,9 +186,6 @@ static int acpi_event_genetlink_init(void) | |||
280 | 186 | ||
281 | static int __init acpi_event_init(void) | 187 | static int __init acpi_event_init(void) |
282 | { | 188 | { |
283 | #ifdef CONFIG_ACPI_PROC_EVENT | ||
284 | struct proc_dir_entry *entry; | ||
285 | #endif | ||
286 | int error = 0; | 189 | int error = 0; |
287 | 190 | ||
288 | if (acpi_disabled) | 191 | if (acpi_disabled) |
@@ -293,15 +196,6 @@ static int __init acpi_event_init(void) | |||
293 | if (error) | 196 | if (error) |
294 | printk(KERN_WARNING PREFIX | 197 | printk(KERN_WARNING PREFIX |
295 | "Failed to create genetlink family for ACPI event\n"); | 198 | "Failed to create genetlink family for ACPI event\n"); |
296 | |||
297 | #ifdef CONFIG_ACPI_PROC_EVENT | ||
298 | /* 'event' [R] */ | ||
299 | entry = proc_create("event", S_IRUSR, acpi_root_dir, | ||
300 | &acpi_system_event_ops); | ||
301 | if (!entry) | ||
302 | return -ENODEV; | ||
303 | #endif | ||
304 | |||
305 | return 0; | 199 | return 0; |
306 | } | 200 | } |
307 | 201 | ||
diff --git a/drivers/acpi/processor_driver.c b/drivers/acpi/processor_driver.c index 823be116619e..94b7b3b5559e 100644 --- a/drivers/acpi/processor_driver.c +++ b/drivers/acpi/processor_driver.c | |||
@@ -91,21 +91,17 @@ static void acpi_processor_notify(acpi_handle handle, u32 event, void *data) | |||
91 | acpi_processor_ppc_has_changed(pr, 1); | 91 | acpi_processor_ppc_has_changed(pr, 1); |
92 | if (saved == pr->performance_platform_limit) | 92 | if (saved == pr->performance_platform_limit) |
93 | break; | 93 | break; |
94 | acpi_bus_generate_proc_event(device, event, | ||
95 | pr->performance_platform_limit); | ||
96 | acpi_bus_generate_netlink_event(device->pnp.device_class, | 94 | acpi_bus_generate_netlink_event(device->pnp.device_class, |
97 | dev_name(&device->dev), event, | 95 | dev_name(&device->dev), event, |
98 | pr->performance_platform_limit); | 96 | pr->performance_platform_limit); |
99 | break; | 97 | break; |
100 | case ACPI_PROCESSOR_NOTIFY_POWER: | 98 | case ACPI_PROCESSOR_NOTIFY_POWER: |
101 | acpi_processor_cst_has_changed(pr); | 99 | acpi_processor_cst_has_changed(pr); |
102 | acpi_bus_generate_proc_event(device, event, 0); | ||
103 | acpi_bus_generate_netlink_event(device->pnp.device_class, | 100 | acpi_bus_generate_netlink_event(device->pnp.device_class, |
104 | dev_name(&device->dev), event, 0); | 101 | dev_name(&device->dev), event, 0); |
105 | break; | 102 | break; |
106 | case ACPI_PROCESSOR_NOTIFY_THROTTLING: | 103 | case ACPI_PROCESSOR_NOTIFY_THROTTLING: |
107 | acpi_processor_tstate_has_changed(pr); | 104 | acpi_processor_tstate_has_changed(pr); |
108 | acpi_bus_generate_proc_event(device, event, 0); | ||
109 | acpi_bus_generate_netlink_event(device->pnp.device_class, | 105 | acpi_bus_generate_netlink_event(device->pnp.device_class, |
110 | dev_name(&device->dev), event, 0); | 106 | dev_name(&device->dev), event, 0); |
111 | break; | 107 | break; |
diff --git a/drivers/acpi/sbs.c b/drivers/acpi/sbs.c index b6241eeb1132..aef7e1cd1e5d 100644 --- a/drivers/acpi/sbs.c +++ b/drivers/acpi/sbs.c | |||
@@ -873,14 +873,9 @@ static void acpi_sbs_callback(void *context) | |||
873 | u8 saved_charger_state = sbs->charger_present; | 873 | u8 saved_charger_state = sbs->charger_present; |
874 | u8 saved_battery_state; | 874 | u8 saved_battery_state; |
875 | acpi_ac_get_present(sbs); | 875 | acpi_ac_get_present(sbs); |
876 | if (sbs->charger_present != saved_charger_state) { | 876 | if (sbs->charger_present != saved_charger_state) |
877 | #ifdef CONFIG_ACPI_PROC_EVENT | ||
878 | acpi_bus_generate_proc_event4(ACPI_AC_CLASS, ACPI_AC_DIR_NAME, | ||
879 | ACPI_SBS_NOTIFY_STATUS, | ||
880 | sbs->charger_present); | ||
881 | #endif | ||
882 | kobject_uevent(&sbs->charger.dev->kobj, KOBJ_CHANGE); | 877 | kobject_uevent(&sbs->charger.dev->kobj, KOBJ_CHANGE); |
883 | } | 878 | |
884 | if (sbs->manager_present) { | 879 | if (sbs->manager_present) { |
885 | for (id = 0; id < MAX_SBS_BAT; ++id) { | 880 | for (id = 0; id < MAX_SBS_BAT; ++id) { |
886 | if (!(sbs->batteries_supported & (1 << id))) | 881 | if (!(sbs->batteries_supported & (1 << id))) |
@@ -890,12 +885,6 @@ static void acpi_sbs_callback(void *context) | |||
890 | acpi_battery_read(bat); | 885 | acpi_battery_read(bat); |
891 | if (saved_battery_state == bat->present) | 886 | if (saved_battery_state == bat->present) |
892 | continue; | 887 | continue; |
893 | #ifdef CONFIG_ACPI_PROC_EVENT | ||
894 | acpi_bus_generate_proc_event4(ACPI_BATTERY_CLASS, | ||
895 | bat->name, | ||
896 | ACPI_SBS_NOTIFY_STATUS, | ||
897 | bat->present); | ||
898 | #endif | ||
899 | kobject_uevent(&bat->bat.dev->kobj, KOBJ_CHANGE); | 888 | kobject_uevent(&bat->bat.dev->kobj, KOBJ_CHANGE); |
900 | } | 889 | } |
901 | } | 890 | } |
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c index a33821ca3895..547a906a7662 100644 --- a/drivers/acpi/thermal.c +++ b/drivers/acpi/thermal.c | |||
@@ -769,7 +769,6 @@ static int thermal_notify(struct thermal_zone_device *thermal, int trip, | |||
769 | else | 769 | else |
770 | return 0; | 770 | return 0; |
771 | 771 | ||
772 | acpi_bus_generate_proc_event(tz->device, type, 1); | ||
773 | acpi_bus_generate_netlink_event(tz->device->pnp.device_class, | 772 | acpi_bus_generate_netlink_event(tz->device->pnp.device_class, |
774 | dev_name(&tz->device->dev), type, 1); | 773 | dev_name(&tz->device->dev), type, 1); |
775 | 774 | ||
@@ -980,14 +979,12 @@ static void acpi_thermal_notify(struct acpi_device *device, u32 event) | |||
980 | case ACPI_THERMAL_NOTIFY_THRESHOLDS: | 979 | case ACPI_THERMAL_NOTIFY_THRESHOLDS: |
981 | acpi_thermal_trips_update(tz, ACPI_TRIPS_REFRESH_THRESHOLDS); | 980 | acpi_thermal_trips_update(tz, ACPI_TRIPS_REFRESH_THRESHOLDS); |
982 | acpi_thermal_check(tz); | 981 | acpi_thermal_check(tz); |
983 | acpi_bus_generate_proc_event(device, event, 0); | ||
984 | acpi_bus_generate_netlink_event(device->pnp.device_class, | 982 | acpi_bus_generate_netlink_event(device->pnp.device_class, |
985 | dev_name(&device->dev), event, 0); | 983 | dev_name(&device->dev), event, 0); |
986 | break; | 984 | break; |
987 | case ACPI_THERMAL_NOTIFY_DEVICES: | 985 | case ACPI_THERMAL_NOTIFY_DEVICES: |
988 | acpi_thermal_trips_update(tz, ACPI_TRIPS_REFRESH_DEVICES); | 986 | acpi_thermal_trips_update(tz, ACPI_TRIPS_REFRESH_DEVICES); |
989 | acpi_thermal_check(tz); | 987 | acpi_thermal_check(tz); |
990 | acpi_bus_generate_proc_event(device, event, 0); | ||
991 | acpi_bus_generate_netlink_event(device->pnp.device_class, | 988 | acpi_bus_generate_netlink_event(device->pnp.device_class, |
992 | dev_name(&device->dev), event, 0); | 989 | dev_name(&device->dev), event, 0); |
993 | break; | 990 | break; |
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index 5d7075d25700..8f91a3783191 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c | |||
@@ -1556,7 +1556,6 @@ static void acpi_video_bus_notify(struct acpi_device *device, u32 event) | |||
1556 | switch (event) { | 1556 | switch (event) { |
1557 | case ACPI_VIDEO_NOTIFY_SWITCH: /* User requested a switch, | 1557 | case ACPI_VIDEO_NOTIFY_SWITCH: /* User requested a switch, |
1558 | * most likely via hotkey. */ | 1558 | * most likely via hotkey. */ |
1559 | acpi_bus_generate_proc_event(device, event, 0); | ||
1560 | keycode = KEY_SWITCHVIDEOMODE; | 1559 | keycode = KEY_SWITCHVIDEOMODE; |
1561 | break; | 1560 | break; |
1562 | 1561 | ||
@@ -1564,20 +1563,16 @@ static void acpi_video_bus_notify(struct acpi_device *device, u32 event) | |||
1564 | * connector. */ | 1563 | * connector. */ |
1565 | acpi_video_device_enumerate(video); | 1564 | acpi_video_device_enumerate(video); |
1566 | acpi_video_device_rebind(video); | 1565 | acpi_video_device_rebind(video); |
1567 | acpi_bus_generate_proc_event(device, event, 0); | ||
1568 | keycode = KEY_SWITCHVIDEOMODE; | 1566 | keycode = KEY_SWITCHVIDEOMODE; |
1569 | break; | 1567 | break; |
1570 | 1568 | ||
1571 | case ACPI_VIDEO_NOTIFY_CYCLE: /* Cycle Display output hotkey pressed. */ | 1569 | case ACPI_VIDEO_NOTIFY_CYCLE: /* Cycle Display output hotkey pressed. */ |
1572 | acpi_bus_generate_proc_event(device, event, 0); | ||
1573 | keycode = KEY_SWITCHVIDEOMODE; | 1570 | keycode = KEY_SWITCHVIDEOMODE; |
1574 | break; | 1571 | break; |
1575 | case ACPI_VIDEO_NOTIFY_NEXT_OUTPUT: /* Next Display output hotkey pressed. */ | 1572 | case ACPI_VIDEO_NOTIFY_NEXT_OUTPUT: /* Next Display output hotkey pressed. */ |
1576 | acpi_bus_generate_proc_event(device, event, 0); | ||
1577 | keycode = KEY_VIDEO_NEXT; | 1573 | keycode = KEY_VIDEO_NEXT; |
1578 | break; | 1574 | break; |
1579 | case ACPI_VIDEO_NOTIFY_PREV_OUTPUT: /* previous Display output hotkey pressed. */ | 1575 | case ACPI_VIDEO_NOTIFY_PREV_OUTPUT: /* previous Display output hotkey pressed. */ |
1580 | acpi_bus_generate_proc_event(device, event, 0); | ||
1581 | keycode = KEY_VIDEO_PREV; | 1576 | keycode = KEY_VIDEO_PREV; |
1582 | break; | 1577 | break; |
1583 | 1578 | ||
@@ -1620,31 +1615,26 @@ static void acpi_video_device_notify(acpi_handle handle, u32 event, void *data) | |||
1620 | case ACPI_VIDEO_NOTIFY_CYCLE_BRIGHTNESS: /* Cycle brightness */ | 1615 | case ACPI_VIDEO_NOTIFY_CYCLE_BRIGHTNESS: /* Cycle brightness */ |
1621 | if (brightness_switch_enabled) | 1616 | if (brightness_switch_enabled) |
1622 | acpi_video_switch_brightness(video_device, event); | 1617 | acpi_video_switch_brightness(video_device, event); |
1623 | acpi_bus_generate_proc_event(device, event, 0); | ||
1624 | keycode = KEY_BRIGHTNESS_CYCLE; | 1618 | keycode = KEY_BRIGHTNESS_CYCLE; |
1625 | break; | 1619 | break; |
1626 | case ACPI_VIDEO_NOTIFY_INC_BRIGHTNESS: /* Increase brightness */ | 1620 | case ACPI_VIDEO_NOTIFY_INC_BRIGHTNESS: /* Increase brightness */ |
1627 | if (brightness_switch_enabled) | 1621 | if (brightness_switch_enabled) |
1628 | acpi_video_switch_brightness(video_device, event); | 1622 | acpi_video_switch_brightness(video_device, event); |
1629 | acpi_bus_generate_proc_event(device, event, 0); | ||
1630 | keycode = KEY_BRIGHTNESSUP; | 1623 | keycode = KEY_BRIGHTNESSUP; |
1631 | break; | 1624 | break; |
1632 | case ACPI_VIDEO_NOTIFY_DEC_BRIGHTNESS: /* Decrease brightness */ | 1625 | case ACPI_VIDEO_NOTIFY_DEC_BRIGHTNESS: /* Decrease brightness */ |
1633 | if (brightness_switch_enabled) | 1626 | if (brightness_switch_enabled) |
1634 | acpi_video_switch_brightness(video_device, event); | 1627 | acpi_video_switch_brightness(video_device, event); |
1635 | acpi_bus_generate_proc_event(device, event, 0); | ||
1636 | keycode = KEY_BRIGHTNESSDOWN; | 1628 | keycode = KEY_BRIGHTNESSDOWN; |
1637 | break; | 1629 | break; |
1638 | case ACPI_VIDEO_NOTIFY_ZERO_BRIGHTNESS: /* zero brightness */ | 1630 | case ACPI_VIDEO_NOTIFY_ZERO_BRIGHTNESS: /* zero brightness */ |
1639 | if (brightness_switch_enabled) | 1631 | if (brightness_switch_enabled) |
1640 | acpi_video_switch_brightness(video_device, event); | 1632 | acpi_video_switch_brightness(video_device, event); |
1641 | acpi_bus_generate_proc_event(device, event, 0); | ||
1642 | keycode = KEY_BRIGHTNESS_ZERO; | 1633 | keycode = KEY_BRIGHTNESS_ZERO; |
1643 | break; | 1634 | break; |
1644 | case ACPI_VIDEO_NOTIFY_DISPLAY_OFF: /* display device off */ | 1635 | case ACPI_VIDEO_NOTIFY_DISPLAY_OFF: /* display device off */ |
1645 | if (brightness_switch_enabled) | 1636 | if (brightness_switch_enabled) |
1646 | acpi_video_switch_brightness(video_device, event); | 1637 | acpi_video_switch_brightness(video_device, event); |
1647 | acpi_bus_generate_proc_event(device, event, 0); | ||
1648 | keycode = KEY_DISPLAY_OFF; | 1638 | keycode = KEY_DISPLAY_OFF; |
1649 | break; | 1639 | break; |
1650 | default: | 1640 | default: |
diff --git a/drivers/char/sonypi.c b/drivers/char/sonypi.c index bf2349dbbf7f..7cc1fe2241fd 100644 --- a/drivers/char/sonypi.c +++ b/drivers/char/sonypi.c | |||
@@ -876,11 +876,6 @@ found: | |||
876 | if (useinput) | 876 | if (useinput) |
877 | sonypi_report_input_event(event); | 877 | sonypi_report_input_event(event); |
878 | 878 | ||
879 | #ifdef CONFIG_ACPI | ||
880 | if (sonypi_acpi_device) | ||
881 | acpi_bus_generate_proc_event(sonypi_acpi_device, 1, event); | ||
882 | #endif | ||
883 | |||
884 | kfifo_in_locked(&sonypi_device.fifo, (unsigned char *)&event, | 879 | kfifo_in_locked(&sonypi_device.fifo, (unsigned char *)&event, |
885 | sizeof(event), &sonypi_device.fifo_lock); | 880 | sizeof(event), &sonypi_device.fifo_lock); |
886 | kill_fasync(&sonypi_device.fifo_async, SIGIO, POLL_IN); | 881 | kill_fasync(&sonypi_device.fifo_async, SIGIO, POLL_IN); |
diff --git a/drivers/pci/hotplug/acpiphp_ibm.c b/drivers/pci/hotplug/acpiphp_ibm.c index c35e8ad6db01..5394fffdf167 100644 --- a/drivers/pci/hotplug/acpiphp_ibm.c +++ b/drivers/pci/hotplug/acpiphp_ibm.c | |||
@@ -270,7 +270,6 @@ static void ibm_handle_events(acpi_handle handle, u32 event, void *context) | |||
270 | 270 | ||
271 | if (subevent == 0x80) { | 271 | if (subevent == 0x80) { |
272 | dbg("%s: generationg bus event\n", __func__); | 272 | dbg("%s: generationg bus event\n", __func__); |
273 | acpi_bus_generate_proc_event(note->device, note->event, detail); | ||
274 | acpi_bus_generate_netlink_event(note->device->pnp.device_class, | 273 | acpi_bus_generate_netlink_event(note->device->pnp.device_class, |
275 | dev_name(¬e->device->dev), | 274 | dev_name(¬e->device->dev), |
276 | note->event, detail); | 275 | note->event, detail); |
diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/asus-laptop.c index 8e268da6fdbd..0e9c169b42f8 100644 --- a/drivers/platform/x86/asus-laptop.c +++ b/drivers/platform/x86/asus-laptop.c | |||
@@ -1543,7 +1543,6 @@ static void asus_acpi_notify(struct acpi_device *device, u32 event) | |||
1543 | 1543 | ||
1544 | /* TODO Find a better way to handle events count. */ | 1544 | /* TODO Find a better way to handle events count. */ |
1545 | count = asus->event_count[event % 128]++; | 1545 | count = asus->event_count[event % 128]++; |
1546 | acpi_bus_generate_proc_event(asus->device, event, count); | ||
1547 | acpi_bus_generate_netlink_event(asus->device->pnp.device_class, | 1546 | acpi_bus_generate_netlink_event(asus->device->pnp.device_class, |
1548 | dev_name(&asus->device->dev), event, | 1547 | dev_name(&asus->device->dev), event, |
1549 | count); | 1548 | count); |
diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c index 5d26e70bed6c..a6afd4108beb 100644 --- a/drivers/platform/x86/eeepc-laptop.c +++ b/drivers/platform/x86/eeepc-laptop.c | |||
@@ -1269,7 +1269,6 @@ static void eeepc_acpi_notify(struct acpi_device *device, u32 event) | |||
1269 | if (event > ACPI_MAX_SYS_NOTIFY) | 1269 | if (event > ACPI_MAX_SYS_NOTIFY) |
1270 | return; | 1270 | return; |
1271 | count = eeepc->event_count[event % 128]++; | 1271 | count = eeepc->event_count[event % 128]++; |
1272 | acpi_bus_generate_proc_event(device, event, count); | ||
1273 | acpi_bus_generate_netlink_event(device->pnp.device_class, | 1272 | acpi_bus_generate_netlink_event(device->pnp.device_class, |
1274 | dev_name(&device->dev), event, | 1273 | dev_name(&device->dev), event, |
1275 | count); | 1274 | count); |
diff --git a/drivers/platform/x86/fujitsu-laptop.c b/drivers/platform/x86/fujitsu-laptop.c index 1c9386e7c58c..52b8a97efde1 100644 --- a/drivers/platform/x86/fujitsu-laptop.c +++ b/drivers/platform/x86/fujitsu-laptop.c | |||
@@ -773,8 +773,6 @@ static void acpi_fujitsu_notify(struct acpi_device *device, u32 event) | |||
773 | else | 773 | else |
774 | set_lcd_level(newb); | 774 | set_lcd_level(newb); |
775 | } | 775 | } |
776 | acpi_bus_generate_proc_event(fujitsu->dev, | ||
777 | ACPI_VIDEO_NOTIFY_INC_BRIGHTNESS, 0); | ||
778 | keycode = KEY_BRIGHTNESSUP; | 776 | keycode = KEY_BRIGHTNESSUP; |
779 | } else if (oldb > newb) { | 777 | } else if (oldb > newb) { |
780 | if (disable_brightness_adjust != 1) { | 778 | if (disable_brightness_adjust != 1) { |
@@ -783,8 +781,6 @@ static void acpi_fujitsu_notify(struct acpi_device *device, u32 event) | |||
783 | else | 781 | else |
784 | set_lcd_level(newb); | 782 | set_lcd_level(newb); |
785 | } | 783 | } |
786 | acpi_bus_generate_proc_event(fujitsu->dev, | ||
787 | ACPI_VIDEO_NOTIFY_DEC_BRIGHTNESS, 0); | ||
788 | keycode = KEY_BRIGHTNESSDOWN; | 784 | keycode = KEY_BRIGHTNESSDOWN; |
789 | } | 785 | } |
790 | break; | 786 | break; |
diff --git a/drivers/platform/x86/panasonic-laptop.c b/drivers/platform/x86/panasonic-laptop.c index 4add9a31bf60..984253da365d 100644 --- a/drivers/platform/x86/panasonic-laptop.c +++ b/drivers/platform/x86/panasonic-laptop.c | |||
@@ -464,9 +464,6 @@ static void acpi_pcc_generate_keyinput(struct pcc_acpi *pcc) | |||
464 | "error getting hotkey status\n")); | 464 | "error getting hotkey status\n")); |
465 | return; | 465 | return; |
466 | } | 466 | } |
467 | |||
468 | acpi_bus_generate_proc_event(pcc->device, HKEY_NOTIFY, result); | ||
469 | |||
470 | if (!sparse_keymap_report_event(hotk_input_dev, | 467 | if (!sparse_keymap_report_event(hotk_input_dev, |
471 | result & 0xf, result & 0x80, false)) | 468 | result & 0xf, result & 0x80, false)) |
472 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 469 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, |
diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c index 2ac045f27f10..069821b1fc22 100644 --- a/drivers/platform/x86/sony-laptop.c +++ b/drivers/platform/x86/sony-laptop.c | |||
@@ -1275,9 +1275,6 @@ static void sony_nc_notify(struct acpi_device *device, u32 event) | |||
1275 | ev_type = HOTKEY; | 1275 | ev_type = HOTKEY; |
1276 | sony_laptop_report_input_event(real_ev); | 1276 | sony_laptop_report_input_event(real_ev); |
1277 | } | 1277 | } |
1278 | |||
1279 | acpi_bus_generate_proc_event(sony_nc_acpi_device, ev_type, real_ev); | ||
1280 | |||
1281 | acpi_bus_generate_netlink_event(sony_nc_acpi_device->pnp.device_class, | 1278 | acpi_bus_generate_netlink_event(sony_nc_acpi_device->pnp.device_class, |
1282 | dev_name(&sony_nc_acpi_device->dev), ev_type, real_ev); | 1279 | dev_name(&sony_nc_acpi_device->dev), ev_type, real_ev); |
1283 | } | 1280 | } |
@@ -4243,7 +4240,6 @@ static irqreturn_t sony_pic_irq(int irq, void *dev_id) | |||
4243 | 4240 | ||
4244 | found: | 4241 | found: |
4245 | sony_laptop_report_input_event(device_event); | 4242 | sony_laptop_report_input_event(device_event); |
4246 | acpi_bus_generate_proc_event(dev->acpi_dev, 1, device_event); | ||
4247 | sonypi_compat_report_event(device_event); | 4243 | sonypi_compat_report_event(device_event); |
4248 | return IRQ_HANDLED; | 4244 | return IRQ_HANDLED; |
4249 | } | 4245 | } |
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index 54d31c0a9840..e946c0d58a97 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c | |||
@@ -2282,10 +2282,6 @@ static struct tp_acpi_drv_struct ibm_hotkey_acpidriver; | |||
2282 | static void tpacpi_hotkey_send_key(unsigned int scancode) | 2282 | static void tpacpi_hotkey_send_key(unsigned int scancode) |
2283 | { | 2283 | { |
2284 | tpacpi_input_send_key_masked(scancode); | 2284 | tpacpi_input_send_key_masked(scancode); |
2285 | if (hotkey_report_mode < 2) { | ||
2286 | acpi_bus_generate_proc_event(ibm_hotkey_acpidriver.device, | ||
2287 | 0x80, TP_HKEY_EV_HOTKEY_BASE + scancode); | ||
2288 | } | ||
2289 | } | 2285 | } |
2290 | 2286 | ||
2291 | static void hotkey_read_nvram(struct tp_nvram_state *n, const u32 m) | 2287 | static void hotkey_read_nvram(struct tp_nvram_state *n, const u32 m) |
@@ -3737,13 +3733,6 @@ static void hotkey_notify(struct ibm_struct *ibm, u32 event) | |||
3737 | "event happened to %s\n", TPACPI_MAIL); | 3733 | "event happened to %s\n", TPACPI_MAIL); |
3738 | } | 3734 | } |
3739 | 3735 | ||
3740 | /* Legacy events */ | ||
3741 | if (!ignore_acpi_ev && | ||
3742 | (send_acpi_ev || hotkey_report_mode < 2)) { | ||
3743 | acpi_bus_generate_proc_event(ibm->acpi->device, | ||
3744 | event, hkey); | ||
3745 | } | ||
3746 | |||
3747 | /* netlink events */ | 3736 | /* netlink events */ |
3748 | if (!ignore_acpi_ev && send_acpi_ev) { | 3737 | if (!ignore_acpi_ev && send_acpi_ev) { |
3749 | acpi_bus_generate_netlink_event( | 3738 | acpi_bus_generate_netlink_event( |
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index 56e6b68c8d2f..2650d1f19e43 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h | |||
@@ -383,15 +383,6 @@ bool acpi_bus_can_wakeup(acpi_handle handle); | |||
383 | static inline bool acpi_bus_can_wakeup(acpi_handle handle) { return false; } | 383 | static inline bool acpi_bus_can_wakeup(acpi_handle handle) { return false; } |
384 | #endif | 384 | #endif |
385 | 385 | ||
386 | #ifdef CONFIG_ACPI_PROC_EVENT | ||
387 | int acpi_bus_generate_proc_event(struct acpi_device *device, u8 type, int data); | ||
388 | int acpi_bus_generate_proc_event4(const char *class, const char *bid, u8 type, int data); | ||
389 | int acpi_bus_receive_event(struct acpi_bus_event *event); | ||
390 | #else | ||
391 | static inline int acpi_bus_generate_proc_event(struct acpi_device *device, u8 type, int data) | ||
392 | { return 0; } | ||
393 | #endif | ||
394 | |||
395 | void acpi_scan_lock_acquire(void); | 386 | void acpi_scan_lock_acquire(void); |
396 | void acpi_scan_lock_release(void); | 387 | void acpi_scan_lock_release(void); |
397 | int acpi_scan_add_handler(struct acpi_scan_handler *handler); | 388 | int acpi_scan_add_handler(struct acpi_scan_handler *handler); |