diff options
-rw-r--r-- | Documentation/feature-removal-schedule.txt | 8 | ||||
-rw-r--r-- | drivers/acpi/Kconfig | 14 | ||||
-rw-r--r-- | drivers/acpi/ac.c | 2 | ||||
-rw-r--r-- | drivers/acpi/asus_acpi.c | 2 | ||||
-rw-r--r-- | drivers/acpi/battery.c | 2 | ||||
-rw-r--r-- | drivers/acpi/bus.c | 6 | ||||
-rw-r--r-- | drivers/acpi/button.c | 2 | ||||
-rw-r--r-- | drivers/acpi/event.c | 6 | ||||
-rw-r--r-- | drivers/acpi/processor_core.c | 6 | ||||
-rw-r--r-- | drivers/acpi/sbs.c | 2 | ||||
-rw-r--r-- | drivers/acpi/thermal.c | 8 | ||||
-rw-r--r-- | drivers/acpi/video.c | 10 | ||||
-rw-r--r-- | drivers/char/sonypi.c | 2 | ||||
-rw-r--r-- | drivers/misc/asus-laptop.c | 2 | ||||
-rw-r--r-- | drivers/misc/sony-laptop.c | 4 | ||||
-rw-r--r-- | drivers/misc/thinkpad_acpi.c | 8 | ||||
-rw-r--r-- | drivers/pci/hotplug/acpiphp_ibm.c | 2 | ||||
-rw-r--r-- | include/acpi/acpi_bus.h | 7 |
18 files changed, 64 insertions, 29 deletions
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt index a43d2878a4ef..b9a3fdc1cc5a 100644 --- a/Documentation/feature-removal-schedule.txt +++ b/Documentation/feature-removal-schedule.txt | |||
@@ -197,6 +197,14 @@ Who: Len Brown <len.brown@intel.com> | |||
197 | 197 | ||
198 | --------------------------- | 198 | --------------------------- |
199 | 199 | ||
200 | What: /proc/acpi/event | ||
201 | When: February 2008 | ||
202 | Why: /proc/acpi/event has been replaced by events via the input layer | ||
203 | and netlink since 2.6.23. | ||
204 | Who: Len Brown <len.brown@intel.com> | ||
205 | |||
206 | --------------------------- | ||
207 | |||
200 | What: Compaq touchscreen device emulation | 208 | What: Compaq touchscreen device emulation |
201 | When: Oct 2007 | 209 | When: Oct 2007 |
202 | Files: drivers/input/tsdev.c | 210 | Files: drivers/input/tsdev.c |
diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig index f1372de4ce79..574259476fbf 100644 --- a/drivers/acpi/Kconfig +++ b/drivers/acpi/Kconfig | |||
@@ -68,6 +68,20 @@ config ACPI_PROCFS | |||
68 | 68 | ||
69 | Say N to delete /proc/acpi/ files that have moved to /sys/ | 69 | Say N to delete /proc/acpi/ files that have moved to /sys/ |
70 | 70 | ||
71 | config ACPI_PROC_EVENT | ||
72 | bool "Deprecated /proc/acpi/event support" | ||
73 | depends on PROC_FS | ||
74 | ---help--- | ||
75 | A user-space daemon, acpi, typically read /proc/acpi/event | ||
76 | and handled all ACPI sub-system generated events. | ||
77 | |||
78 | These events are now delivered to user-space via | ||
79 | either the input layer, or as netlink events. | ||
80 | |||
81 | This build option enables the old code for for legacy | ||
82 | user-space implementation. After some time, this will | ||
83 | be moved under CONFIG_ACPI_PROCFS, and then deleted. | ||
84 | |||
71 | config ACPI_AC | 85 | config ACPI_AC |
72 | tristate "AC Adapter" | 86 | tristate "AC Adapter" |
73 | depends on X86 | 87 | depends on X86 |
diff --git a/drivers/acpi/ac.c b/drivers/acpi/ac.c index b53c2cfcafd3..26d70702b313 100644 --- a/drivers/acpi/ac.c +++ b/drivers/acpi/ac.c | |||
@@ -204,7 +204,7 @@ static void acpi_ac_notify(acpi_handle handle, u32 event, void *data) | |||
204 | case ACPI_NOTIFY_BUS_CHECK: | 204 | case ACPI_NOTIFY_BUS_CHECK: |
205 | case ACPI_NOTIFY_DEVICE_CHECK: | 205 | case ACPI_NOTIFY_DEVICE_CHECK: |
206 | acpi_ac_get_state(ac); | 206 | acpi_ac_get_state(ac); |
207 | acpi_bus_generate_event(device, event, (u32) ac->state); | 207 | acpi_bus_generate_proc_event(device, event, (u32) ac->state); |
208 | acpi_bus_generate_netlink_event(device->pnp.device_class, | 208 | acpi_bus_generate_netlink_event(device->pnp.device_class, |
209 | device->dev.bus_id, event, | 209 | device->dev.bus_id, event, |
210 | (u32) ac->state); | 210 | (u32) ac->state); |
diff --git a/drivers/acpi/asus_acpi.c b/drivers/acpi/asus_acpi.c index 86fd142f4bf3..d915fec9bf63 100644 --- a/drivers/acpi/asus_acpi.c +++ b/drivers/acpi/asus_acpi.c | |||
@@ -1069,7 +1069,7 @@ static void asus_hotk_notify(acpi_handle handle, u32 event, void *data) | |||
1069 | hotk->brightness = (event & ~((u32) BR_DOWN)); | 1069 | hotk->brightness = (event & ~((u32) BR_DOWN)); |
1070 | } | 1070 | } |
1071 | 1071 | ||
1072 | acpi_bus_generate_event(hotk->device, event, | 1072 | acpi_bus_generate_proc_event(hotk->device, event, |
1073 | hotk->event_count[event % 128]++); | 1073 | hotk->event_count[event % 128]++); |
1074 | 1074 | ||
1075 | return; | 1075 | return; |
diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c index 9f0bf90afdab..91dc4b316a08 100644 --- a/drivers/acpi/battery.c +++ b/drivers/acpi/battery.c | |||
@@ -867,7 +867,7 @@ static void acpi_battery_notify(acpi_handle handle, u32 event, void *data) | |||
867 | case ACPI_NOTIFY_DEVICE_CHECK: | 867 | case ACPI_NOTIFY_DEVICE_CHECK: |
868 | device = battery->device; | 868 | device = battery->device; |
869 | acpi_battery_notify_update(battery); | 869 | acpi_battery_notify_update(battery); |
870 | acpi_bus_generate_event(device, event, | 870 | acpi_bus_generate_proc_event(device, event, |
871 | acpi_battery_present(battery)); | 871 | acpi_battery_present(battery)); |
872 | acpi_bus_generate_netlink_event(device->pnp.device_class, | 872 | acpi_bus_generate_netlink_event(device->pnp.device_class, |
873 | device->dev.bus_id, event, | 873 | device->dev.bus_id, event, |
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index e5084ececb6f..9ba778a2b484 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c | |||
@@ -276,6 +276,7 @@ EXPORT_SYMBOL(acpi_bus_set_power); | |||
276 | Event Management | 276 | Event Management |
277 | -------------------------------------------------------------------------- */ | 277 | -------------------------------------------------------------------------- */ |
278 | 278 | ||
279 | #ifdef CONFIG_ACPI_PROC_EVENT | ||
279 | static DEFINE_SPINLOCK(acpi_bus_event_lock); | 280 | static DEFINE_SPINLOCK(acpi_bus_event_lock); |
280 | 281 | ||
281 | LIST_HEAD(acpi_bus_event_list); | 282 | LIST_HEAD(acpi_bus_event_list); |
@@ -283,7 +284,7 @@ DECLARE_WAIT_QUEUE_HEAD(acpi_bus_event_queue); | |||
283 | 284 | ||
284 | extern int event_is_open; | 285 | extern int event_is_open; |
285 | 286 | ||
286 | int acpi_bus_generate_event(struct acpi_device *device, u8 type, int data) | 287 | int acpi_bus_generate_proc_event(struct acpi_device *device, u8 type, int data) |
287 | { | 288 | { |
288 | struct acpi_bus_event *event = NULL; | 289 | struct acpi_bus_event *event = NULL; |
289 | unsigned long flags = 0; | 290 | unsigned long flags = 0; |
@@ -314,7 +315,7 @@ int acpi_bus_generate_event(struct acpi_device *device, u8 type, int data) | |||
314 | return 0; | 315 | return 0; |
315 | } | 316 | } |
316 | 317 | ||
317 | EXPORT_SYMBOL(acpi_bus_generate_event); | 318 | EXPORT_SYMBOL(acpi_bus_generate_proc_event); |
318 | 319 | ||
319 | int acpi_bus_receive_event(struct acpi_bus_event *event) | 320 | int acpi_bus_receive_event(struct acpi_bus_event *event) |
320 | { | 321 | { |
@@ -360,6 +361,7 @@ int acpi_bus_receive_event(struct acpi_bus_event *event) | |||
360 | } | 361 | } |
361 | 362 | ||
362 | EXPORT_SYMBOL(acpi_bus_receive_event); | 363 | EXPORT_SYMBOL(acpi_bus_receive_event); |
364 | #endif /* CONFIG_ACPI_PROC_EVENT */ | ||
363 | 365 | ||
364 | /* -------------------------------------------------------------------------- | 366 | /* -------------------------------------------------------------------------- |
365 | Notification Handling | 367 | Notification Handling |
diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c index 540581338ef5..2e79a3395ecf 100644 --- a/drivers/acpi/button.c +++ b/drivers/acpi/button.c | |||
@@ -284,7 +284,7 @@ static void acpi_button_notify(acpi_handle handle, u32 event, void *data) | |||
284 | } | 284 | } |
285 | input_sync(input); | 285 | input_sync(input); |
286 | 286 | ||
287 | acpi_bus_generate_event(button->device, event, | 287 | acpi_bus_generate_proc_event(button->device, event, |
288 | ++button->pushed); | 288 | ++button->pushed); |
289 | break; | 289 | break; |
290 | default: | 290 | default: |
diff --git a/drivers/acpi/event.c b/drivers/acpi/event.c index b7b143288c22..cf6d5161cf31 100644 --- a/drivers/acpi/event.c +++ b/drivers/acpi/event.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #define _COMPONENT ACPI_SYSTEM_COMPONENT | 17 | #define _COMPONENT ACPI_SYSTEM_COMPONENT |
18 | ACPI_MODULE_NAME("event"); | 18 | ACPI_MODULE_NAME("event"); |
19 | 19 | ||
20 | #ifdef CONFIG_ACPI_PROC_EVENT | ||
20 | /* Global vars for handling event proc entry */ | 21 | /* Global vars for handling event proc entry */ |
21 | static DEFINE_SPINLOCK(acpi_system_event_lock); | 22 | static DEFINE_SPINLOCK(acpi_system_event_lock); |
22 | int event_is_open = 0; | 23 | int event_is_open = 0; |
@@ -106,6 +107,7 @@ static const struct file_operations acpi_system_event_ops = { | |||
106 | .release = acpi_system_close_event, | 107 | .release = acpi_system_close_event, |
107 | .poll = acpi_system_poll_event, | 108 | .poll = acpi_system_poll_event, |
108 | }; | 109 | }; |
110 | #endif /* CONFIG_ACPI_PROC_EVENT */ | ||
109 | 111 | ||
110 | #ifdef CONFIG_NET | 112 | #ifdef CONFIG_NET |
111 | static unsigned int acpi_event_seqnum; | 113 | static unsigned int acpi_event_seqnum; |
@@ -247,7 +249,9 @@ static int acpi_event_genetlink_init(void) | |||
247 | 249 | ||
248 | static int __init acpi_event_init(void) | 250 | static int __init acpi_event_init(void) |
249 | { | 251 | { |
252 | #ifdef CONFIG_ACPI_PROC_EVENT | ||
250 | struct proc_dir_entry *entry; | 253 | struct proc_dir_entry *entry; |
254 | #endif | ||
251 | int error = 0; | 255 | int error = 0; |
252 | 256 | ||
253 | if (acpi_disabled) | 257 | if (acpi_disabled) |
@@ -259,12 +263,14 @@ static int __init acpi_event_init(void) | |||
259 | printk(KERN_WARNING PREFIX | 263 | printk(KERN_WARNING PREFIX |
260 | "Failed to create genetlink family for ACPI event\n"); | 264 | "Failed to create genetlink family for ACPI event\n"); |
261 | 265 | ||
266 | #ifdef CONFIG_ACPI_PROC_EVENT | ||
262 | /* 'event' [R] */ | 267 | /* 'event' [R] */ |
263 | entry = create_proc_entry("event", S_IRUSR, acpi_root_dir); | 268 | entry = create_proc_entry("event", S_IRUSR, acpi_root_dir); |
264 | if (entry) | 269 | if (entry) |
265 | entry->proc_fops = &acpi_system_event_ops; | 270 | entry->proc_fops = &acpi_system_event_ops; |
266 | else | 271 | else |
267 | return -ENODEV; | 272 | return -ENODEV; |
273 | #endif | ||
268 | 274 | ||
269 | return 0; | 275 | return 0; |
270 | } | 276 | } |
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c index dbc2e5d9d6a7..e944aaee4e06 100644 --- a/drivers/acpi/processor_core.c +++ b/drivers/acpi/processor_core.c | |||
@@ -698,7 +698,7 @@ static void acpi_processor_notify(acpi_handle handle, u32 event, void *data) | |||
698 | switch (event) { | 698 | switch (event) { |
699 | case ACPI_PROCESSOR_NOTIFY_PERFORMANCE: | 699 | case ACPI_PROCESSOR_NOTIFY_PERFORMANCE: |
700 | acpi_processor_ppc_has_changed(pr); | 700 | acpi_processor_ppc_has_changed(pr); |
701 | acpi_bus_generate_event(device, event, | 701 | acpi_bus_generate_proc_event(device, event, |
702 | pr->performance_platform_limit); | 702 | pr->performance_platform_limit); |
703 | acpi_bus_generate_netlink_event(device->pnp.device_class, | 703 | acpi_bus_generate_netlink_event(device->pnp.device_class, |
704 | device->dev.bus_id, event, | 704 | device->dev.bus_id, event, |
@@ -706,13 +706,13 @@ static void acpi_processor_notify(acpi_handle handle, u32 event, void *data) | |||
706 | break; | 706 | break; |
707 | case ACPI_PROCESSOR_NOTIFY_POWER: | 707 | case ACPI_PROCESSOR_NOTIFY_POWER: |
708 | acpi_processor_cst_has_changed(pr); | 708 | acpi_processor_cst_has_changed(pr); |
709 | acpi_bus_generate_event(device, event, 0); | 709 | acpi_bus_generate_proc_event(device, event, 0); |
710 | acpi_bus_generate_netlink_event(device->pnp.device_class, | 710 | acpi_bus_generate_netlink_event(device->pnp.device_class, |
711 | device->dev.bus_id, event, 0); | 711 | device->dev.bus_id, event, 0); |
712 | break; | 712 | break; |
713 | case ACPI_PROCESSOR_NOTIFY_THROTTLING: | 713 | case ACPI_PROCESSOR_NOTIFY_THROTTLING: |
714 | acpi_processor_tstate_has_changed(pr); | 714 | acpi_processor_tstate_has_changed(pr); |
715 | acpi_bus_generate_event(device, event, 0); | 715 | acpi_bus_generate_proc_event(device, event, 0); |
716 | acpi_bus_generate_netlink_event(device->pnp.device_class, | 716 | acpi_bus_generate_netlink_event(device->pnp.device_class, |
717 | device->dev.bus_id, event, 0); | 717 | device->dev.bus_id, event, 0); |
718 | default: | 718 | default: |
diff --git a/drivers/acpi/sbs.c b/drivers/acpi/sbs.c index 2d67e92c8ff7..a578986e3214 100644 --- a/drivers/acpi/sbs.c +++ b/drivers/acpi/sbs.c | |||
@@ -440,7 +440,7 @@ static int acpi_sbs_generate_event(struct acpi_device *device, | |||
440 | strcpy(acpi_device_bid(device), bid); | 440 | strcpy(acpi_device_bid(device), bid); |
441 | strcpy(acpi_device_class(device), class); | 441 | strcpy(acpi_device_class(device), class); |
442 | 442 | ||
443 | result = acpi_bus_generate_event(device, event, state); | 443 | result = acpi_bus_generate_proc_event(device, event, state); |
444 | 444 | ||
445 | strcpy(acpi_device_bid(device), bid_saved); | 445 | strcpy(acpi_device_bid(device), bid_saved); |
446 | strcpy(acpi_device_class(device), class_saved); | 446 | strcpy(acpi_device_class(device), class_saved); |
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c index 291758c9a4d6..2c9cfe297f73 100644 --- a/drivers/acpi/thermal.c +++ b/drivers/acpi/thermal.c | |||
@@ -485,7 +485,7 @@ static int acpi_thermal_critical(struct acpi_thermal *tz) | |||
485 | printk(KERN_EMERG | 485 | printk(KERN_EMERG |
486 | "Critical temperature reached (%ld C), shutting down.\n", | 486 | "Critical temperature reached (%ld C), shutting down.\n", |
487 | KELVIN_TO_CELSIUS(tz->temperature)); | 487 | KELVIN_TO_CELSIUS(tz->temperature)); |
488 | acpi_bus_generate_event(tz->device, ACPI_THERMAL_NOTIFY_CRITICAL, | 488 | acpi_bus_generate_proc_event(tz->device, ACPI_THERMAL_NOTIFY_CRITICAL, |
489 | tz->trips.critical.flags.enabled); | 489 | tz->trips.critical.flags.enabled); |
490 | acpi_bus_generate_netlink_event(tz->device->pnp.device_class, | 490 | acpi_bus_generate_netlink_event(tz->device->pnp.device_class, |
491 | tz->device->dev.bus_id, | 491 | tz->device->dev.bus_id, |
@@ -508,7 +508,7 @@ static int acpi_thermal_hot(struct acpi_thermal *tz) | |||
508 | } else if (tz->trips.hot.flags.enabled) | 508 | } else if (tz->trips.hot.flags.enabled) |
509 | tz->trips.hot.flags.enabled = 0; | 509 | tz->trips.hot.flags.enabled = 0; |
510 | 510 | ||
511 | acpi_bus_generate_event(tz->device, ACPI_THERMAL_NOTIFY_HOT, | 511 | acpi_bus_generate_proc_event(tz->device, ACPI_THERMAL_NOTIFY_HOT, |
512 | tz->trips.hot.flags.enabled); | 512 | tz->trips.hot.flags.enabled); |
513 | acpi_bus_generate_netlink_event(tz->device->pnp.device_class, | 513 | acpi_bus_generate_netlink_event(tz->device->pnp.device_class, |
514 | tz->device->dev.bus_id, | 514 | tz->device->dev.bus_id, |
@@ -1157,14 +1157,14 @@ static void acpi_thermal_notify(acpi_handle handle, u32 event, void *data) | |||
1157 | case ACPI_THERMAL_NOTIFY_THRESHOLDS: | 1157 | case ACPI_THERMAL_NOTIFY_THRESHOLDS: |
1158 | acpi_thermal_get_trip_points(tz); | 1158 | acpi_thermal_get_trip_points(tz); |
1159 | acpi_thermal_check(tz); | 1159 | acpi_thermal_check(tz); |
1160 | acpi_bus_generate_event(device, event, 0); | 1160 | acpi_bus_generate_proc_event(device, event, 0); |
1161 | acpi_bus_generate_netlink_event(device->pnp.device_class, | 1161 | acpi_bus_generate_netlink_event(device->pnp.device_class, |
1162 | device->dev.bus_id, event, 0); | 1162 | device->dev.bus_id, event, 0); |
1163 | break; | 1163 | break; |
1164 | case ACPI_THERMAL_NOTIFY_DEVICES: | 1164 | case ACPI_THERMAL_NOTIFY_DEVICES: |
1165 | if (tz->flags.devices) | 1165 | if (tz->flags.devices) |
1166 | acpi_thermal_get_devices(tz); | 1166 | acpi_thermal_get_devices(tz); |
1167 | acpi_bus_generate_event(device, event, 0); | 1167 | acpi_bus_generate_proc_event(device, event, 0); |
1168 | acpi_bus_generate_netlink_event(device->pnp.device_class, | 1168 | acpi_bus_generate_netlink_event(device->pnp.device_class, |
1169 | device->dev.bus_id, event, 0); | 1169 | device->dev.bus_id, event, 0); |
1170 | break; | 1170 | break; |
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index d98701941981..9a5cfcfd8da5 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c | |||
@@ -1775,7 +1775,7 @@ static void acpi_video_bus_notify(acpi_handle handle, u32 event, void *data) | |||
1775 | switch (event) { | 1775 | switch (event) { |
1776 | case ACPI_VIDEO_NOTIFY_SWITCH: /* User requested a switch, | 1776 | case ACPI_VIDEO_NOTIFY_SWITCH: /* User requested a switch, |
1777 | * most likely via hotkey. */ | 1777 | * most likely via hotkey. */ |
1778 | acpi_bus_generate_event(device, event, 0); | 1778 | acpi_bus_generate_proc_event(device, event, 0); |
1779 | break; | 1779 | break; |
1780 | 1780 | ||
1781 | case ACPI_VIDEO_NOTIFY_PROBE: /* User plugged in or removed a video | 1781 | case ACPI_VIDEO_NOTIFY_PROBE: /* User plugged in or removed a video |
@@ -1783,14 +1783,14 @@ static void acpi_video_bus_notify(acpi_handle handle, u32 event, void *data) | |||
1783 | acpi_video_device_enumerate(video); | 1783 | acpi_video_device_enumerate(video); |
1784 | acpi_video_device_rebind(video); | 1784 | acpi_video_device_rebind(video); |
1785 | acpi_video_switch_output(video, event); | 1785 | acpi_video_switch_output(video, event); |
1786 | acpi_bus_generate_event(device, event, 0); | 1786 | acpi_bus_generate_proc_event(device, event, 0); |
1787 | break; | 1787 | break; |
1788 | 1788 | ||
1789 | case ACPI_VIDEO_NOTIFY_CYCLE: /* Cycle Display output hotkey pressed. */ | 1789 | case ACPI_VIDEO_NOTIFY_CYCLE: /* Cycle Display output hotkey pressed. */ |
1790 | case ACPI_VIDEO_NOTIFY_NEXT_OUTPUT: /* Next Display output hotkey pressed. */ | 1790 | case ACPI_VIDEO_NOTIFY_NEXT_OUTPUT: /* Next Display output hotkey pressed. */ |
1791 | case ACPI_VIDEO_NOTIFY_PREV_OUTPUT: /* previous Display output hotkey pressed. */ | 1791 | case ACPI_VIDEO_NOTIFY_PREV_OUTPUT: /* previous Display output hotkey pressed. */ |
1792 | acpi_video_switch_output(video, event); | 1792 | acpi_video_switch_output(video, event); |
1793 | acpi_bus_generate_event(device, event, 0); | 1793 | acpi_bus_generate_proc_event(device, event, 0); |
1794 | break; | 1794 | break; |
1795 | 1795 | ||
1796 | default: | 1796 | default: |
@@ -1815,7 +1815,7 @@ static void acpi_video_device_notify(acpi_handle handle, u32 event, void *data) | |||
1815 | switch (event) { | 1815 | switch (event) { |
1816 | case ACPI_VIDEO_NOTIFY_SWITCH: /* change in status (cycle output device) */ | 1816 | case ACPI_VIDEO_NOTIFY_SWITCH: /* change in status (cycle output device) */ |
1817 | case ACPI_VIDEO_NOTIFY_PROBE: /* change in status (output device status) */ | 1817 | case ACPI_VIDEO_NOTIFY_PROBE: /* change in status (output device status) */ |
1818 | acpi_bus_generate_event(device, event, 0); | 1818 | acpi_bus_generate_proc_event(device, event, 0); |
1819 | break; | 1819 | break; |
1820 | case ACPI_VIDEO_NOTIFY_CYCLE_BRIGHTNESS: /* Cycle brightness */ | 1820 | case ACPI_VIDEO_NOTIFY_CYCLE_BRIGHTNESS: /* Cycle brightness */ |
1821 | case ACPI_VIDEO_NOTIFY_INC_BRIGHTNESS: /* Increase brightness */ | 1821 | case ACPI_VIDEO_NOTIFY_INC_BRIGHTNESS: /* Increase brightness */ |
@@ -1823,7 +1823,7 @@ static void acpi_video_device_notify(acpi_handle handle, u32 event, void *data) | |||
1823 | case ACPI_VIDEO_NOTIFY_ZERO_BRIGHTNESS: /* zero brightnesss */ | 1823 | case ACPI_VIDEO_NOTIFY_ZERO_BRIGHTNESS: /* zero brightnesss */ |
1824 | case ACPI_VIDEO_NOTIFY_DISPLAY_OFF: /* display device off */ | 1824 | case ACPI_VIDEO_NOTIFY_DISPLAY_OFF: /* display device off */ |
1825 | acpi_video_switch_brightness(video_device, event); | 1825 | acpi_video_switch_brightness(video_device, event); |
1826 | acpi_bus_generate_event(device, event, 0); | 1826 | acpi_bus_generate_proc_event(device, event, 0); |
1827 | break; | 1827 | break; |
1828 | default: | 1828 | default: |
1829 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, | 1829 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, |
diff --git a/drivers/char/sonypi.c b/drivers/char/sonypi.c index aeec67e27264..859858561ab6 100644 --- a/drivers/char/sonypi.c +++ b/drivers/char/sonypi.c | |||
@@ -875,7 +875,7 @@ found: | |||
875 | 875 | ||
876 | #ifdef CONFIG_ACPI | 876 | #ifdef CONFIG_ACPI |
877 | if (sonypi_acpi_device) | 877 | if (sonypi_acpi_device) |
878 | acpi_bus_generate_event(sonypi_acpi_device, 1, event); | 878 | acpi_bus_generate_proc_event(sonypi_acpi_device, 1, event); |
879 | #endif | 879 | #endif |
880 | 880 | ||
881 | kfifo_put(sonypi_device.fifo, (unsigned char *)&event, sizeof(event)); | 881 | kfifo_put(sonypi_device.fifo, (unsigned char *)&event, sizeof(event)); |
diff --git a/drivers/misc/asus-laptop.c b/drivers/misc/asus-laptop.c index d0fc4fd212e6..f8ae58f01637 100644 --- a/drivers/misc/asus-laptop.c +++ b/drivers/misc/asus-laptop.c | |||
@@ -732,7 +732,7 @@ static void asus_hotk_notify(acpi_handle handle, u32 event, void *data) | |||
732 | lcd_blank(FB_BLANK_POWERDOWN); | 732 | lcd_blank(FB_BLANK_POWERDOWN); |
733 | } | 733 | } |
734 | 734 | ||
735 | acpi_bus_generate_event(hotk->device, event, | 735 | acpi_bus_generate_proc_event(hotk->device, event, |
736 | hotk->event_count[event % 128]++); | 736 | hotk->event_count[event % 128]++); |
737 | 737 | ||
738 | return; | 738 | return; |
diff --git a/drivers/misc/sony-laptop.c b/drivers/misc/sony-laptop.c index 91da6880ae93..743bd49ae6f5 100644 --- a/drivers/misc/sony-laptop.c +++ b/drivers/misc/sony-laptop.c | |||
@@ -904,7 +904,7 @@ static void sony_acpi_notify(acpi_handle handle, u32 event, void *data) | |||
904 | 904 | ||
905 | dprintk("sony_acpi_notify, event: 0x%.2x\n", ev); | 905 | dprintk("sony_acpi_notify, event: 0x%.2x\n", ev); |
906 | sony_laptop_report_input_event(ev); | 906 | sony_laptop_report_input_event(ev); |
907 | acpi_bus_generate_event(sony_nc_acpi_device, 1, ev); | 907 | acpi_bus_generate_proc_event(sony_nc_acpi_device, 1, ev); |
908 | } | 908 | } |
909 | 909 | ||
910 | static acpi_status sony_walk_callback(acpi_handle handle, u32 level, | 910 | static acpi_status sony_walk_callback(acpi_handle handle, u32 level, |
@@ -2292,7 +2292,7 @@ static irqreturn_t sony_pic_irq(int irq, void *dev_id) | |||
2292 | 2292 | ||
2293 | found: | 2293 | found: |
2294 | sony_laptop_report_input_event(device_event); | 2294 | sony_laptop_report_input_event(device_event); |
2295 | acpi_bus_generate_event(spic_dev.acpi_dev, 1, device_event); | 2295 | acpi_bus_generate_proc_event(spic_dev.acpi_dev, 1, device_event); |
2296 | sonypi_compat_report_event(device_event); | 2296 | sonypi_compat_report_event(device_event); |
2297 | 2297 | ||
2298 | return IRQ_HANDLED; | 2298 | return IRQ_HANDLED; |
diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c index d0825a34a7b0..bb8956d0c104 100644 --- a/drivers/misc/thinkpad_acpi.c +++ b/drivers/misc/thinkpad_acpi.c | |||
@@ -1190,10 +1190,10 @@ static void hotkey_notify(struct ibm_struct *ibm, u32 event) | |||
1190 | } | 1190 | } |
1191 | 1191 | ||
1192 | if (sendacpi) | 1192 | if (sendacpi) |
1193 | acpi_bus_generate_event(ibm->acpi->device, event, hkey); | 1193 | acpi_bus_generate_proc_event(ibm->acpi->device, event, hkey); |
1194 | } else { | 1194 | } else { |
1195 | printk(IBM_ERR "unknown hotkey notification event %d\n", event); | 1195 | printk(IBM_ERR "unknown hotkey notification event %d\n", event); |
1196 | acpi_bus_generate_event(ibm->acpi->device, event, 0); | 1196 | acpi_bus_generate_proc_event(ibm->acpi->device, event, 0); |
1197 | } | 1197 | } |
1198 | } | 1198 | } |
1199 | 1199 | ||
@@ -2179,7 +2179,7 @@ static void dock_notify(struct ibm_struct *ibm, u32 event) | |||
2179 | event, _sta(dock_handle)); | 2179 | event, _sta(dock_handle)); |
2180 | data = 0; /* unknown */ | 2180 | data = 0; /* unknown */ |
2181 | } | 2181 | } |
2182 | acpi_bus_generate_event(ibm->acpi->device, event, data); | 2182 | acpi_bus_generate_proc_event(ibm->acpi->device, event, data); |
2183 | acpi_bus_generate_netlink_event(ibm->acpi->device->pnp.device_class, | 2183 | acpi_bus_generate_netlink_event(ibm->acpi->device->pnp.device_class, |
2184 | ibm->acpi->device->dev.bus_id, | 2184 | ibm->acpi->device->dev.bus_id, |
2185 | event, data); | 2185 | event, data); |
@@ -2280,7 +2280,7 @@ static int __init bay_init(struct ibm_init_struct *iibm) | |||
2280 | 2280 | ||
2281 | static void bay_notify(struct ibm_struct *ibm, u32 event) | 2281 | static void bay_notify(struct ibm_struct *ibm, u32 event) |
2282 | { | 2282 | { |
2283 | acpi_bus_generate_event(ibm->acpi->device, event, 0); | 2283 | acpi_bus_generate_proc_event(ibm->acpi->device, event, 0); |
2284 | acpi_bus_generate_netlink_event(ibm->acpi->device->pnp.device_class, | 2284 | acpi_bus_generate_netlink_event(ibm->acpi->device->pnp.device_class, |
2285 | ibm->acpi->device->dev.bus_id, | 2285 | ibm->acpi->device->dev.bus_id, |
2286 | event, 0); | 2286 | event, 0); |
diff --git a/drivers/pci/hotplug/acpiphp_ibm.c b/drivers/pci/hotplug/acpiphp_ibm.c index 360902476bad..d2c410cd3c45 100644 --- a/drivers/pci/hotplug/acpiphp_ibm.c +++ b/drivers/pci/hotplug/acpiphp_ibm.c | |||
@@ -267,7 +267,7 @@ static void ibm_handle_events(acpi_handle handle, u32 event, void *context) | |||
267 | 267 | ||
268 | if (subevent == 0x80) { | 268 | if (subevent == 0x80) { |
269 | dbg("%s: generationg bus event\n", __FUNCTION__); | 269 | dbg("%s: generationg bus event\n", __FUNCTION__); |
270 | acpi_bus_generate_event(note->device, note->event, detail); | 270 | acpi_bus_generate_proc_event(note->device, note->event, detail); |
271 | acpi_bus_generate_netlink_event(note->device->pnp.device_class, | 271 | acpi_bus_generate_netlink_event(note->device->pnp.device_class, |
272 | note->device->dev.bus_id, | 272 | note->device->dev.bus_id, |
273 | note->event, detail); | 273 | note->event, detail); |
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index 8203cddeb4cb..86aea44ce6d4 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h | |||
@@ -331,8 +331,13 @@ void acpi_bus_data_handler(acpi_handle handle, u32 function, void *context); | |||
331 | int acpi_bus_get_status(struct acpi_device *device); | 331 | int acpi_bus_get_status(struct acpi_device *device); |
332 | int acpi_bus_get_power(acpi_handle handle, int *state); | 332 | int acpi_bus_get_power(acpi_handle handle, int *state); |
333 | int acpi_bus_set_power(acpi_handle handle, int state); | 333 | int acpi_bus_set_power(acpi_handle handle, int state); |
334 | int acpi_bus_generate_event(struct acpi_device *device, u8 type, int data); | 334 | #ifdef CONFIG_ACPI_PROC_EVENT |
335 | int acpi_bus_generate_proc_event(struct acpi_device *device, u8 type, int data); | ||
335 | int acpi_bus_receive_event(struct acpi_bus_event *event); | 336 | int acpi_bus_receive_event(struct acpi_bus_event *event); |
337 | #else | ||
338 | static inline int acpi_bus_generate_proc_event(struct acpi_device *device, u8 type, int data) | ||
339 | { return 0; } | ||
340 | #endif | ||
336 | int acpi_bus_register_driver(struct acpi_driver *driver); | 341 | int acpi_bus_register_driver(struct acpi_driver *driver); |
337 | void acpi_bus_unregister_driver(struct acpi_driver *driver); | 342 | void acpi_bus_unregister_driver(struct acpi_driver *driver); |
338 | int acpi_bus_add(struct acpi_device **child, struct acpi_device *parent, | 343 | int acpi_bus_add(struct acpi_device **child, struct acpi_device *parent, |