aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2007-08-25 01:44:01 -0400
committerLen Brown <len.brown@intel.com>2007-08-25 01:44:01 -0400
commit25c87f7f2a4fc3e50a7912b1c78405d454d1c4d9 (patch)
treec42d40004e9668d83ab03ab7332515ef08683c54 /drivers
parenta4fd4946214fae86610b989c47e5ae762cc96ddb (diff)
parent3e069ee0c30d6f28b79e409ef2df1ffa427897ae (diff)
Pull events into release branch
Conflicts: drivers/acpi/video.c Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/acpi/Kconfig14
-rw-r--r--drivers/acpi/ac.c5
-rw-r--r--drivers/acpi/asus_acpi.c2
-rw-r--r--drivers/acpi/battery.c5
-rw-r--r--drivers/acpi/bus.c10
-rw-r--r--drivers/acpi/button.c2
-rw-r--r--drivers/acpi/event.c22
-rw-r--r--drivers/acpi/processor_core.c13
-rw-r--r--drivers/acpi/sbs.c3
-rw-r--r--drivers/acpi/thermal.c20
-rw-r--r--drivers/acpi/video.c20
-rw-r--r--drivers/char/sonypi.c2
-rw-r--r--drivers/misc/asus-laptop.c2
-rw-r--r--drivers/misc/sony-laptop.c4
-rw-r--r--drivers/misc/thinkpad_acpi.c26
-rw-r--r--drivers/pci/hotplug/acpiphp_ibm.c5
16 files changed, 108 insertions, 47 deletions
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
71config 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
71config ACPI_AC 85config 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 d8b35093527a..26d70702b313 100644
--- a/drivers/acpi/ac.c
+++ b/drivers/acpi/ac.c
@@ -204,7 +204,10 @@ 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,
209 device->dev.bus_id, event,
210 (u32) ac->state);
208 break; 211 break;
209 default: 212 default:
210 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 213 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
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 81651032791b..9b2c0f74f869 100644
--- a/drivers/acpi/battery.c
+++ b/drivers/acpi/battery.c
@@ -872,8 +872,11 @@ static void acpi_battery_notify(acpi_handle handle, u32 event, void *data)
872 case ACPI_NOTIFY_DEVICE_CHECK: 872 case ACPI_NOTIFY_DEVICE_CHECK:
873 device = battery->device; 873 device = battery->device;
874 acpi_battery_notify_update(battery); 874 acpi_battery_notify_update(battery);
875 acpi_bus_generate_event(device, event, 875 acpi_bus_generate_proc_event(device, event,
876 acpi_battery_present(battery)); 876 acpi_battery_present(battery));
877 acpi_bus_generate_netlink_event(device->pnp.device_class,
878 device->dev.bus_id, event,
879 acpi_battery_present(battery));
877 break; 880 break;
878 default: 881 default:
879 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 882 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index 6b2658c96242..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
279static DEFINE_SPINLOCK(acpi_bus_event_lock); 280static DEFINE_SPINLOCK(acpi_bus_event_lock);
280 281
281LIST_HEAD(acpi_bus_event_list); 282LIST_HEAD(acpi_bus_event_list);
@@ -283,7 +284,7 @@ DECLARE_WAIT_QUEUE_HEAD(acpi_bus_event_queue);
283 284
284extern int event_is_open; 285extern int event_is_open;
285 286
286int acpi_bus_generate_event(struct acpi_device *device, u8 type, int data) 287int 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;
@@ -292,10 +293,6 @@ int acpi_bus_generate_event(struct acpi_device *device, u8 type, int data)
292 if (!device) 293 if (!device)
293 return -EINVAL; 294 return -EINVAL;
294 295
295 if (acpi_bus_generate_genetlink_event(device, type, data))
296 printk(KERN_WARNING PREFIX
297 "Failed to generate an ACPI event via genetlink!\n");
298
299 /* drop event on the floor if no one's listening */ 296 /* drop event on the floor if no one's listening */
300 if (!event_is_open) 297 if (!event_is_open)
301 return 0; 298 return 0;
@@ -318,7 +315,7 @@ int acpi_bus_generate_event(struct acpi_device *device, u8 type, int data)
318 return 0; 315 return 0;
319} 316}
320 317
321EXPORT_SYMBOL(acpi_bus_generate_event); 318EXPORT_SYMBOL(acpi_bus_generate_proc_event);
322 319
323int acpi_bus_receive_event(struct acpi_bus_event *event) 320int acpi_bus_receive_event(struct acpi_bus_event *event)
324{ 321{
@@ -364,6 +361,7 @@ int acpi_bus_receive_event(struct acpi_bus_event *event)
364} 361}
365 362
366EXPORT_SYMBOL(acpi_bus_receive_event); 363EXPORT_SYMBOL(acpi_bus_receive_event);
364#endif /* CONFIG_ACPI_PROC_EVENT */
367 365
368/* -------------------------------------------------------------------------- 366/* --------------------------------------------------------------------------
369 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 95637a4ff782..a2b9304596ce 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
18ACPI_MODULE_NAME("event"); 18ACPI_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 */
21static DEFINE_SPINLOCK(acpi_system_event_lock); 22static DEFINE_SPINLOCK(acpi_system_event_lock);
22int event_is_open = 0; 23int 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
111static unsigned int acpi_event_seqnum; 113static unsigned int acpi_event_seqnum;
@@ -147,7 +149,8 @@ static struct genl_multicast_group acpi_event_mcgrp = {
147 .name = ACPI_GENL_MCAST_GROUP_NAME, 149 .name = ACPI_GENL_MCAST_GROUP_NAME,
148}; 150};
149 151
150int acpi_bus_generate_genetlink_event(struct acpi_device *device, 152int acpi_bus_generate_netlink_event(const char *device_class,
153 const char *bus_id,
151 u8 type, int data) 154 u8 type, int data)
152{ 155{
153 struct sk_buff *skb; 156 struct sk_buff *skb;
@@ -191,8 +194,8 @@ int acpi_bus_generate_genetlink_event(struct acpi_device *device,
191 194
192 memset(event, 0, sizeof(struct acpi_genl_event)); 195 memset(event, 0, sizeof(struct acpi_genl_event));
193 196
194 strcpy(event->device_class, device->pnp.device_class); 197 strcpy(event->device_class, device_class);
195 strcpy(event->bus_id, device->dev.bus_id); 198 strcpy(event->bus_id, bus_id);
196 event->type = type; 199 event->type = type;
197 event->data = data; 200 event->data = data;
198 201
@@ -211,6 +214,8 @@ int acpi_bus_generate_genetlink_event(struct acpi_device *device,
211 return 0; 214 return 0;
212} 215}
213 216
217EXPORT_SYMBOL(acpi_bus_generate_netlink_event);
218
214static int acpi_event_genetlink_init(void) 219static int acpi_event_genetlink_init(void)
215{ 220{
216 int result; 221 int result;
@@ -228,12 +233,15 @@ static int acpi_event_genetlink_init(void)
228} 233}
229 234
230#else 235#else
231int acpi_bus_generate_genetlink_event(struct acpi_device *device, u8 type, 236int acpi_bus_generate_netlink_event(const char *device_class,
232 int data) 237 const char *bus_id,
238 u8 type, int data)
233{ 239{
234 return 0; 240 return 0;
235} 241}
236 242
243EXPORT_SYMBOL(acpi_generate_netlink_event);
244
237static int acpi_event_genetlink_init(void) 245static int acpi_event_genetlink_init(void)
238{ 246{
239 return -ENODEV; 247 return -ENODEV;
@@ -242,7 +250,9 @@ static int acpi_event_genetlink_init(void)
242 250
243static int __init acpi_event_init(void) 251static int __init acpi_event_init(void)
244{ 252{
253#ifdef CONFIG_ACPI_PROC_EVENT
245 struct proc_dir_entry *entry; 254 struct proc_dir_entry *entry;
255#endif
246 int error = 0; 256 int error = 0;
247 257
248 if (acpi_disabled) 258 if (acpi_disabled)
@@ -254,12 +264,14 @@ static int __init acpi_event_init(void)
254 printk(KERN_WARNING PREFIX 264 printk(KERN_WARNING PREFIX
255 "Failed to create genetlink family for ACPI event\n"); 265 "Failed to create genetlink family for ACPI event\n");
256 266
267#ifdef CONFIG_ACPI_PROC_EVENT
257 /* 'event' [R] */ 268 /* 'event' [R] */
258 entry = create_proc_entry("event", S_IRUSR, acpi_root_dir); 269 entry = create_proc_entry("event", S_IRUSR, acpi_root_dir);
259 if (entry) 270 if (entry)
260 entry->proc_fops = &acpi_system_event_ops; 271 entry->proc_fops = &acpi_system_event_ops;
261 else 272 else
262 return -ENODEV; 273 return -ENODEV;
274#endif
263 275
264 return 0; 276 return 0;
265} 277}
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c
index 498422343f38..e944aaee4e06 100644
--- a/drivers/acpi/processor_core.c
+++ b/drivers/acpi/processor_core.c
@@ -698,16 +698,23 @@ 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,
704 device->dev.bus_id, event,
705 pr->performance_platform_limit);
703 break; 706 break;
704 case ACPI_PROCESSOR_NOTIFY_POWER: 707 case ACPI_PROCESSOR_NOTIFY_POWER:
705 acpi_processor_cst_has_changed(pr); 708 acpi_processor_cst_has_changed(pr);
706 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,
711 device->dev.bus_id, event, 0);
707 break; 712 break;
708 case ACPI_PROCESSOR_NOTIFY_THROTTLING: 713 case ACPI_PROCESSOR_NOTIFY_THROTTLING:
709 acpi_processor_tstate_has_changed(pr); 714 acpi_processor_tstate_has_changed(pr);
710 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,
717 device->dev.bus_id, event, 0);
711 default: 718 default:
712 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 719 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
713 "Unsupported event [0x%x]\n", event)); 720 "Unsupported event [0x%x]\n", event));
diff --git a/drivers/acpi/sbs.c b/drivers/acpi/sbs.c
index 82c3a550016d..a578986e3214 100644
--- a/drivers/acpi/sbs.c
+++ b/drivers/acpi/sbs.c
@@ -440,11 +440,12 @@ 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);
447 447
448 acpi_bus_generate_netlink_event(class, bid, event, state);
448 return result; 449 return result;
449} 450}
450 451
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index 7e8f48b7f9af..bc6d5866ef98 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -503,8 +503,12 @@ static int acpi_thermal_critical(struct acpi_thermal *tz)
503 printk(KERN_EMERG 503 printk(KERN_EMERG
504 "Critical temperature reached (%ld C), shutting down.\n", 504 "Critical temperature reached (%ld C), shutting down.\n",
505 KELVIN_TO_CELSIUS(tz->temperature)); 505 KELVIN_TO_CELSIUS(tz->temperature));
506 acpi_bus_generate_event(tz->device, ACPI_THERMAL_NOTIFY_CRITICAL, 506 acpi_bus_generate_proc_event(tz->device, ACPI_THERMAL_NOTIFY_CRITICAL,
507 tz->trips.critical.flags.enabled); 507 tz->trips.critical.flags.enabled);
508 acpi_bus_generate_netlink_event(tz->device->pnp.device_class,
509 tz->device->dev.bus_id,
510 ACPI_THERMAL_NOTIFY_CRITICAL,
511 tz->trips.critical.flags.enabled);
508 512
509 orderly_poweroff(true); 513 orderly_poweroff(true);
510 514
@@ -522,8 +526,12 @@ static int acpi_thermal_hot(struct acpi_thermal *tz)
522 } else if (tz->trips.hot.flags.enabled) 526 } else if (tz->trips.hot.flags.enabled)
523 tz->trips.hot.flags.enabled = 0; 527 tz->trips.hot.flags.enabled = 0;
524 528
525 acpi_bus_generate_event(tz->device, ACPI_THERMAL_NOTIFY_HOT, 529 acpi_bus_generate_proc_event(tz->device, ACPI_THERMAL_NOTIFY_HOT,
526 tz->trips.hot.flags.enabled); 530 tz->trips.hot.flags.enabled);
531 acpi_bus_generate_netlink_event(tz->device->pnp.device_class,
532 tz->device->dev.bus_id,
533 ACPI_THERMAL_NOTIFY_HOT,
534 tz->trips.hot.flags.enabled);
527 535
528 /* TBD: Call user-mode "sleep(S4)" function */ 536 /* TBD: Call user-mode "sleep(S4)" function */
529 537
@@ -1167,12 +1175,16 @@ static void acpi_thermal_notify(acpi_handle handle, u32 event, void *data)
1167 case ACPI_THERMAL_NOTIFY_THRESHOLDS: 1175 case ACPI_THERMAL_NOTIFY_THRESHOLDS:
1168 acpi_thermal_get_trip_points(tz); 1176 acpi_thermal_get_trip_points(tz);
1169 acpi_thermal_check(tz); 1177 acpi_thermal_check(tz);
1170 acpi_bus_generate_event(device, event, 0); 1178 acpi_bus_generate_proc_event(device, event, 0);
1179 acpi_bus_generate_netlink_event(device->pnp.device_class,
1180 device->dev.bus_id, event, 0);
1171 break; 1181 break;
1172 case ACPI_THERMAL_NOTIFY_DEVICES: 1182 case ACPI_THERMAL_NOTIFY_DEVICES:
1173 if (tz->flags.devices) 1183 if (tz->flags.devices)
1174 acpi_thermal_get_devices(tz); 1184 acpi_thermal_get_devices(tz);
1175 acpi_bus_generate_event(device, event, 0); 1185 acpi_bus_generate_proc_event(device, event, 0);
1186 acpi_bus_generate_netlink_event(device->pnp.device_class,
1187 device->dev.bus_id, event, 0);
1176 break; 1188 break;
1177 default: 1189 default:
1178 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 1190 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index d727d2c715df..6659bdd2a454 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -1781,7 +1781,7 @@ static void acpi_video_bus_notify(acpi_handle handle, u32 event, void *data)
1781 switch (event) { 1781 switch (event) {
1782 case ACPI_VIDEO_NOTIFY_SWITCH: /* User requested a switch, 1782 case ACPI_VIDEO_NOTIFY_SWITCH: /* User requested a switch,
1783 * most likely via hotkey. */ 1783 * most likely via hotkey. */
1784 acpi_bus_generate_event(device, event, 0); 1784 acpi_bus_generate_proc_event(device, event, 0);
1785 keycode = KEY_SWITCHVIDEOMODE; 1785 keycode = KEY_SWITCHVIDEOMODE;
1786 break; 1786 break;
1787 1787
@@ -1790,23 +1790,23 @@ static void acpi_video_bus_notify(acpi_handle handle, u32 event, void *data)
1790 acpi_video_device_enumerate(video); 1790 acpi_video_device_enumerate(video);
1791 acpi_video_device_rebind(video); 1791 acpi_video_device_rebind(video);
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 keycode = KEY_SWITCHVIDEOMODE; 1794 keycode = KEY_SWITCHVIDEOMODE;
1795 break; 1795 break;
1796 1796
1797 case ACPI_VIDEO_NOTIFY_CYCLE: /* Cycle Display output hotkey pressed. */ 1797 case ACPI_VIDEO_NOTIFY_CYCLE: /* Cycle Display output hotkey pressed. */
1798 acpi_video_switch_output(video, event); 1798 acpi_video_switch_output(video, event);
1799 acpi_bus_generate_event(device, event, 0); 1799 acpi_bus_generate_proc_event(device, event, 0);
1800 keycode = KEY_SWITCHVIDEOMODE; 1800 keycode = KEY_SWITCHVIDEOMODE;
1801 break; 1801 break;
1802 case ACPI_VIDEO_NOTIFY_NEXT_OUTPUT: /* Next Display output hotkey pressed. */ 1802 case ACPI_VIDEO_NOTIFY_NEXT_OUTPUT: /* Next Display output hotkey pressed. */
1803 acpi_video_switch_output(video, event); 1803 acpi_video_switch_output(video, event);
1804 acpi_bus_generate_event(device, event, 0); 1804 acpi_bus_generate_proc_event(device, event, 0);
1805 keycode = KEY_VIDEO_NEXT; 1805 keycode = KEY_VIDEO_NEXT;
1806 break; 1806 break;
1807 case ACPI_VIDEO_NOTIFY_PREV_OUTPUT: /* previous Display output hotkey pressed. */ 1807 case ACPI_VIDEO_NOTIFY_PREV_OUTPUT: /* previous Display output hotkey pressed. */
1808 acpi_video_switch_output(video, event); 1808 acpi_video_switch_output(video, event);
1809 acpi_bus_generate_event(device, event, 0); 1809 acpi_bus_generate_proc_event(device, event, 0);
1810 keycode = KEY_VIDEO_PREV; 1810 keycode = KEY_VIDEO_PREV;
1811 break; 1811 break;
1812 1812
@@ -1843,27 +1843,27 @@ static void acpi_video_device_notify(acpi_handle handle, u32 event, void *data)
1843 switch (event) { 1843 switch (event) {
1844 case ACPI_VIDEO_NOTIFY_CYCLE_BRIGHTNESS: /* Cycle brightness */ 1844 case ACPI_VIDEO_NOTIFY_CYCLE_BRIGHTNESS: /* Cycle brightness */
1845 acpi_video_switch_brightness(video_device, event); 1845 acpi_video_switch_brightness(video_device, event);
1846 acpi_bus_generate_event(device, event, 0); 1846 acpi_bus_generate_proc_event(device, event, 0);
1847 keycode = KEY_BRIGHTNESS_CYCLE; 1847 keycode = KEY_BRIGHTNESS_CYCLE;
1848 break; 1848 break;
1849 case ACPI_VIDEO_NOTIFY_INC_BRIGHTNESS: /* Increase brightness */ 1849 case ACPI_VIDEO_NOTIFY_INC_BRIGHTNESS: /* Increase brightness */
1850 acpi_video_switch_brightness(video_device, event); 1850 acpi_video_switch_brightness(video_device, event);
1851 acpi_bus_generate_event(device, event, 0); 1851 acpi_bus_generate_proc_event(device, event, 0);
1852 keycode = KEY_BRIGHTNESSUP; 1852 keycode = KEY_BRIGHTNESSUP;
1853 break; 1853 break;
1854 case ACPI_VIDEO_NOTIFY_DEC_BRIGHTNESS: /* Decrease brightness */ 1854 case ACPI_VIDEO_NOTIFY_DEC_BRIGHTNESS: /* Decrease brightness */
1855 acpi_video_switch_brightness(video_device, event); 1855 acpi_video_switch_brightness(video_device, event);
1856 acpi_bus_generate_event(device, event, 0); 1856 acpi_bus_generate_proc_event(device, event, 0);
1857 keycode = KEY_BRIGHTNESSDOWN; 1857 keycode = KEY_BRIGHTNESSDOWN;
1858 break; 1858 break;
1859 case ACPI_VIDEO_NOTIFY_ZERO_BRIGHTNESS: /* zero brightnesss */ 1859 case ACPI_VIDEO_NOTIFY_ZERO_BRIGHTNESS: /* zero brightnesss */
1860 acpi_video_switch_brightness(video_device, event); 1860 acpi_video_switch_brightness(video_device, event);
1861 acpi_bus_generate_event(device, event, 0); 1861 acpi_bus_generate_proc_event(device, event, 0);
1862 keycode = KEY_BRIGHTNESS_ZERO; 1862 keycode = KEY_BRIGHTNESS_ZERO;
1863 break; 1863 break;
1864 case ACPI_VIDEO_NOTIFY_DISPLAY_OFF: /* display device off */ 1864 case ACPI_VIDEO_NOTIFY_DISPLAY_OFF: /* display device off */
1865 acpi_video_switch_brightness(video_device, event); 1865 acpi_video_switch_brightness(video_device, event);
1866 acpi_bus_generate_event(device, event, 0); 1866 acpi_bus_generate_proc_event(device, event, 0);
1867 keycode = KEY_DISPLAY_OFF; 1867 keycode = KEY_DISPLAY_OFF;
1868 break; 1868 break;
1869 default: 1869 default:
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 40db9f70148f..7dce318df1bd 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 7d8bebec2961..d38ddce592c0 100644
--- a/drivers/misc/sony-laptop.c
+++ b/drivers/misc/sony-laptop.c
@@ -913,7 +913,7 @@ static void sony_acpi_notify(acpi_handle handle, u32 event, void *data)
913 913
914 dprintk("sony_acpi_notify, event: 0x%.2x\n", ev); 914 dprintk("sony_acpi_notify, event: 0x%.2x\n", ev);
915 sony_laptop_report_input_event(ev); 915 sony_laptop_report_input_event(ev);
916 acpi_bus_generate_event(sony_nc_acpi_device, 1, ev); 916 acpi_bus_generate_proc_event(sony_nc_acpi_device, 1, ev);
917} 917}
918 918
919static acpi_status sony_walk_callback(acpi_handle handle, u32 level, 919static acpi_status sony_walk_callback(acpi_handle handle, u32 level,
@@ -2301,7 +2301,7 @@ static irqreturn_t sony_pic_irq(int irq, void *dev_id)
2301 2301
2302found: 2302found:
2303 sony_laptop_report_input_event(device_event); 2303 sony_laptop_report_input_event(device_event);
2304 acpi_bus_generate_event(spic_dev.acpi_dev, 1, device_event); 2304 acpi_bus_generate_proc_event(spic_dev.acpi_dev, 1, device_event);
2305 sonypi_compat_report_event(device_event); 2305 sonypi_compat_report_event(device_event);
2306 2306
2307 return IRQ_HANDLED; 2307 return IRQ_HANDLED;
diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c
index f6cd34a3dbac..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
@@ -2162,22 +2162,27 @@ static void dock_notify(struct ibm_struct *ibm, u32 event)
2162 int docked = dock_docked(); 2162 int docked = dock_docked();
2163 int pci = ibm->acpi->hid && ibm->acpi->device && 2163 int pci = ibm->acpi->hid && ibm->acpi->device &&
2164 acpi_match_device_ids(ibm->acpi->device, ibm_pci_device_ids); 2164 acpi_match_device_ids(ibm->acpi->device, ibm_pci_device_ids);
2165 int data;
2165 2166
2166 if (event == 1 && !pci) /* 570 */ 2167 if (event == 1 && !pci) /* 570 */
2167 acpi_bus_generate_event(ibm->acpi->device, event, 1); /* button */ 2168 data = 1; /* button */
2168 else if (event == 1 && pci) /* 570 */ 2169 else if (event == 1 && pci) /* 570 */
2169 acpi_bus_generate_event(ibm->acpi->device, event, 3); /* dock */ 2170 data = 3; /* dock */
2170 else if (event == 3 && docked) 2171 else if (event == 3 && docked)
2171 acpi_bus_generate_event(ibm->acpi->device, event, 1); /* button */ 2172 data = 1; /* button */
2172 else if (event == 3 && !docked) 2173 else if (event == 3 && !docked)
2173 acpi_bus_generate_event(ibm->acpi->device, event, 2); /* undock */ 2174 data = 2; /* undock */
2174 else if (event == 0 && docked) 2175 else if (event == 0 && docked)
2175 acpi_bus_generate_event(ibm->acpi->device, event, 3); /* dock */ 2176 data = 3; /* dock */
2176 else { 2177 else {
2177 printk(IBM_ERR "unknown dock event %d, status %d\n", 2178 printk(IBM_ERR "unknown dock event %d, status %d\n",
2178 event, _sta(dock_handle)); 2179 event, _sta(dock_handle));
2179 acpi_bus_generate_event(ibm->acpi->device, event, 0); /* unknown */ 2180 data = 0; /* unknown */
2180 } 2181 }
2182 acpi_bus_generate_proc_event(ibm->acpi->device, event, data);
2183 acpi_bus_generate_netlink_event(ibm->acpi->device->pnp.device_class,
2184 ibm->acpi->device->dev.bus_id,
2185 event, data);
2181} 2186}
2182 2187
2183static int dock_read(char *p) 2188static int dock_read(char *p)
@@ -2275,7 +2280,10 @@ static int __init bay_init(struct ibm_init_struct *iibm)
2275 2280
2276static void bay_notify(struct ibm_struct *ibm, u32 event) 2281static void bay_notify(struct ibm_struct *ibm, u32 event)
2277{ 2282{
2278 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,
2285 ibm->acpi->device->dev.bus_id,
2286 event, 0);
2279} 2287}
2280 2288
2281#define bay_occupied(b) (_sta(b##_handle) & 1) 2289#define bay_occupied(b) (_sta(b##_handle) & 1)
diff --git a/drivers/pci/hotplug/acpiphp_ibm.c b/drivers/pci/hotplug/acpiphp_ibm.c
index 80544d87437b..56829f82be4a 100644
--- a/drivers/pci/hotplug/acpiphp_ibm.c
+++ b/drivers/pci/hotplug/acpiphp_ibm.c
@@ -267,7 +267,10 @@ 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,
272 note->device->dev.bus_id,
273 note->event, detail);
271 } else 274 } else
272 note->event = event; 275 note->event = event;
273} 276}