diff options
author | Len Brown <len.brown@intel.com> | 2007-08-25 01:44:01 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2007-08-25 01:44:01 -0400 |
commit | 25c87f7f2a4fc3e50a7912b1c78405d454d1c4d9 (patch) | |
tree | c42d40004e9668d83ab03ab7332515ef08683c54 /drivers/acpi | |
parent | a4fd4946214fae86610b989c47e5ae762cc96ddb (diff) | |
parent | 3e069ee0c30d6f28b79e409ef2df1ffa427897ae (diff) |
Pull events into release branch
Conflicts:
drivers/acpi/video.c
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/Kconfig | 14 | ||||
-rw-r--r-- | drivers/acpi/ac.c | 5 | ||||
-rw-r--r-- | drivers/acpi/asus_acpi.c | 2 | ||||
-rw-r--r-- | drivers/acpi/battery.c | 5 | ||||
-rw-r--r-- | drivers/acpi/bus.c | 10 | ||||
-rw-r--r-- | drivers/acpi/button.c | 2 | ||||
-rw-r--r-- | drivers/acpi/event.c | 22 | ||||
-rw-r--r-- | drivers/acpi/processor_core.c | 13 | ||||
-rw-r--r-- | drivers/acpi/sbs.c | 3 | ||||
-rw-r--r-- | drivers/acpi/thermal.c | 20 | ||||
-rw-r--r-- | drivers/acpi/video.c | 20 |
11 files changed, 83 insertions, 33 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 | ||
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 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 | ||
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; |
@@ -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 | ||
321 | EXPORT_SYMBOL(acpi_bus_generate_event); | 318 | EXPORT_SYMBOL(acpi_bus_generate_proc_event); |
322 | 319 | ||
323 | int acpi_bus_receive_event(struct acpi_bus_event *event) | 320 | int 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 | ||
366 | EXPORT_SYMBOL(acpi_bus_receive_event); | 363 | EXPORT_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 |
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; |
@@ -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 | ||
150 | int acpi_bus_generate_genetlink_event(struct acpi_device *device, | 152 | int 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 | ||
217 | EXPORT_SYMBOL(acpi_bus_generate_netlink_event); | ||
218 | |||
214 | static int acpi_event_genetlink_init(void) | 219 | static 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 |
231 | int acpi_bus_generate_genetlink_event(struct acpi_device *device, u8 type, | 236 | int 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 | ||
243 | EXPORT_SYMBOL(acpi_generate_netlink_event); | ||
244 | |||
237 | static int acpi_event_genetlink_init(void) | 245 | static 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 | ||
243 | static int __init acpi_event_init(void) | 251 | static 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: |