aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-08-14 17:22:45 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-08-14 17:22:45 -0400
commitf3ce717e60572421f56d89c9a85ac42e634d16e7 (patch)
tree46b85329773c7908378f90e4e8e86205ebfd229f /drivers
parentd4e4ab86bcba5a72779c43dc1459f71fea3d89c8 (diff)
parente73d3136355f511d3e1c2ef21acf02b19bd2b650 (diff)
Merge back earlier 'acpi-assorted' material
Diffstat (limited to 'drivers')
-rw-r--r--drivers/acpi/Kconfig18
-rw-r--r--drivers/acpi/ac.c1
-rw-r--r--drivers/acpi/acpi_pad.c1
-rw-r--r--drivers/acpi/acpi_platform.c24
-rw-r--r--drivers/acpi/battery.c2
-rw-r--r--drivers/acpi/bus.c120
-rw-r--r--drivers/acpi/button.c2
-rw-r--r--drivers/acpi/dock.c2
-rw-r--r--drivers/acpi/ec.c2
-rw-r--r--drivers/acpi/event.c106
-rw-r--r--drivers/acpi/internal.h1
-rw-r--r--drivers/acpi/numa.c2
-rw-r--r--drivers/acpi/osl.c5
-rw-r--r--drivers/acpi/processor_core.c2
-rw-r--r--drivers/acpi/processor_driver.c4
-rw-r--r--drivers/acpi/sbs.c15
-rw-r--r--drivers/acpi/scan.c30
-rw-r--r--drivers/acpi/sleep.c2
-rw-r--r--drivers/acpi/thermal.c3
-rw-r--r--drivers/acpi/video.c10
-rw-r--r--drivers/char/sonypi.c5
-rw-r--r--drivers/pci/hotplug/acpiphp_ibm.c1
-rw-r--r--drivers/platform/x86/asus-laptop.c1
-rw-r--r--drivers/platform/x86/eeepc-laptop.c1
-rw-r--r--drivers/platform/x86/fujitsu-laptop.c4
-rw-r--r--drivers/platform/x86/panasonic-laptop.c3
-rw-r--r--drivers/platform/x86/sony-laptop.c4
-rw-r--r--drivers/platform/x86/thinkpad_acpi.c40
28 files changed, 46 insertions, 365 deletions
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
94config 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
112config ACPI_AC 94config 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/acpi_platform.c b/drivers/acpi/acpi_platform.c
index fafec5ddf17f..1bde12708f9e 100644
--- a/drivers/acpi/acpi_platform.c
+++ b/drivers/acpi/acpi_platform.c
@@ -52,7 +52,7 @@ int acpi_create_platform_device(struct acpi_device *adev,
52 struct platform_device_info pdevinfo; 52 struct platform_device_info pdevinfo;
53 struct resource_list_entry *rentry; 53 struct resource_list_entry *rentry;
54 struct list_head resource_list; 54 struct list_head resource_list;
55 struct resource *resources; 55 struct resource *resources = NULL;
56 int count; 56 int count;
57 57
58 /* If the ACPI node already has a physical device attached, skip it. */ 58 /* If the ACPI node already has a physical device attached, skip it. */
@@ -61,20 +61,22 @@ int acpi_create_platform_device(struct acpi_device *adev,
61 61
62 INIT_LIST_HEAD(&resource_list); 62 INIT_LIST_HEAD(&resource_list);
63 count = acpi_dev_get_resources(adev, &resource_list, NULL, NULL); 63 count = acpi_dev_get_resources(adev, &resource_list, NULL, NULL);
64 if (count <= 0) 64 if (count < 0) {
65 return 0; 65 return 0;
66 } else if (count > 0) {
67 resources = kmalloc(count * sizeof(struct resource),
68 GFP_KERNEL);
69 if (!resources) {
70 dev_err(&adev->dev, "No memory for resources\n");
71 acpi_dev_free_resource_list(&resource_list);
72 return -ENOMEM;
73 }
74 count = 0;
75 list_for_each_entry(rentry, &resource_list, node)
76 resources[count++] = rentry->res;
66 77
67 resources = kmalloc(count * sizeof(struct resource), GFP_KERNEL);
68 if (!resources) {
69 dev_err(&adev->dev, "No memory for resources\n");
70 acpi_dev_free_resource_list(&resource_list); 78 acpi_dev_free_resource_list(&resource_list);
71 return -ENOMEM;
72 } 79 }
73 count = 0;
74 list_for_each_entry(rentry, &resource_list, node)
75 resources[count++] = rentry->res;
76
77 acpi_dev_free_resource_list(&resource_list);
78 80
79 memset(&pdevinfo, 0, sizeof(pdevinfo)); 81 memset(&pdevinfo, 0, sizeof(pdevinfo));
80 /* 82 /*
diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
index d405fbad406a..85332872da45 100644
--- a/drivers/acpi/battery.c
+++ b/drivers/acpi/battery.c
@@ -1036,8 +1036,6 @@ static void acpi_battery_notify(struct acpi_device *device, u32 event)
1036 if (event == ACPI_BATTERY_NOTIFY_INFO) 1036 if (event == ACPI_BATTERY_NOTIFY_INFO)
1037 acpi_battery_refresh(battery); 1037 acpi_battery_refresh(battery);
1038 acpi_battery_update(battery); 1038 acpi_battery_update(battery);
1039 acpi_bus_generate_proc_event(device, event,
1040 acpi_battery_present(battery));
1041 acpi_bus_generate_netlink_event(device->pnp.device_class, 1039 acpi_bus_generate_netlink_event(device->pnp.device_class,
1042 dev_name(&device->dev), event, 1040 dev_name(&device->dev), event,
1043 acpi_battery_present(battery)); 1041 acpi_battery_present(battery));
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index a5bb33bab448..7df97d277545 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -89,27 +89,6 @@ static struct dmi_system_id dsdt_dmi_table[] __initdata = {
89 Device Management 89 Device Management
90 -------------------------------------------------------------------------- */ 90 -------------------------------------------------------------------------- */
91 91
92int acpi_bus_get_device(acpi_handle handle, struct acpi_device **device)
93{
94 acpi_status status;
95
96 if (!device)
97 return -EINVAL;
98
99 /* TBD: Support fixed-feature devices */
100
101 status = acpi_get_data(handle, acpi_bus_data_handler, (void **)device);
102 if (ACPI_FAILURE(status) || !*device) {
103 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No context for object [%p]\n",
104 handle));
105 return -ENODEV;
106 }
107
108 return 0;
109}
110
111EXPORT_SYMBOL(acpi_bus_get_device);
112
113acpi_status acpi_bus_get_status_handle(acpi_handle handle, 92acpi_status acpi_bus_get_status_handle(acpi_handle handle,
114 unsigned long long *sta) 93 unsigned long long *sta)
115{ 94{
@@ -346,104 +325,6 @@ static void acpi_bus_osc_support(void)
346} 325}
347 326
348/* -------------------------------------------------------------------------- 327/* --------------------------------------------------------------------------
349 Event Management
350 -------------------------------------------------------------------------- */
351
352#ifdef CONFIG_ACPI_PROC_EVENT
353static DEFINE_SPINLOCK(acpi_bus_event_lock);
354
355LIST_HEAD(acpi_bus_event_list);
356DECLARE_WAIT_QUEUE_HEAD(acpi_bus_event_queue);
357
358extern int event_is_open;
359
360int 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
388EXPORT_SYMBOL_GPL(acpi_bus_generate_proc_event4);
389
390int 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
398EXPORT_SYMBOL(acpi_bus_generate_proc_event);
399
400int 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 328 Notification Handling
448 -------------------------------------------------------------------------- */ 329 -------------------------------------------------------------------------- */
449 330
@@ -715,7 +596,6 @@ static int __init acpi_bus_init(void)
715{ 596{
716 int result; 597 int result;
717 acpi_status status; 598 acpi_status status;
718 extern acpi_status acpi_os_initialize1(void);
719 599
720 acpi_os_initialize1(); 600 acpi_os_initialize1();
721 601
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/dock.c b/drivers/acpi/dock.c
index 826560753389..c90112ceb570 100644
--- a/drivers/acpi/dock.c
+++ b/drivers/acpi/dock.c
@@ -1055,7 +1055,7 @@ err_unregister:
1055 * 1055 *
1056 * This is called by acpi_walk_namespace to look for dock stations and bays. 1056 * This is called by acpi_walk_namespace to look for dock stations and bays.
1057 */ 1057 */
1058static __init acpi_status 1058static acpi_status __init
1059find_dock_and_bay(acpi_handle handle, u32 lvl, void *context, void **rv) 1059find_dock_and_bay(acpi_handle handle, u32 lvl, void *context, void **rv)
1060{ 1060{
1061 if (is_dock(handle) || is_ejectable_bay(handle)) 1061 if (is_dock(handle) || is_ejectable_bay(handle))
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 80403c1a89f8..34448038724b 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -948,7 +948,7 @@ static int ec_enlarge_storm_threshold(const struct dmi_system_id *id)
948 return 0; 948 return 0;
949} 949}
950 950
951static struct dmi_system_id __initdata ec_dmi_table[] = { 951static struct dmi_system_id ec_dmi_table[] __initdata = {
952 { 952 {
953 ec_skip_dsdt_scan, "Compal JFL92", { 953 ec_skip_dsdt_scan, "Compal JFL92", {
954 DMI_MATCH(DMI_BIOS_VENDOR, "COMPAL"), 954 DMI_MATCH(DMI_BIOS_VENDOR, "COMPAL"),
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
22ACPI_MODULE_NAME("event"); 22ACPI_MODULE_NAME("event");
23 23
24#ifdef CONFIG_ACPI_PROC_EVENT
25/* Global vars for handling event proc entry */
26static DEFINE_SPINLOCK(acpi_system_event_lock);
27int event_is_open = 0;
28extern struct list_head acpi_bus_event_list;
29extern wait_queue_head_t acpi_bus_event_queue;
30
31static 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
48static ssize_t
49acpi_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
92static 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
100static 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
108static 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 */
119static BLOCKING_NOTIFIER_HEAD(acpi_chain_head); 25static BLOCKING_NOTIFIER_HEAD(acpi_chain_head);
120 26
@@ -280,9 +186,6 @@ static int acpi_event_genetlink_init(void)
280 186
281static int __init acpi_event_init(void) 187static 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/internal.h b/drivers/acpi/internal.h
index 5da44e81dd4d..20f423337e1f 100644
--- a/drivers/acpi/internal.h
+++ b/drivers/acpi/internal.h
@@ -23,6 +23,7 @@
23 23
24#define PREFIX "ACPI: " 24#define PREFIX "ACPI: "
25 25
26acpi_status acpi_os_initialize1(void);
26int init_acpi_device_notify(void); 27int init_acpi_device_notify(void);
27int acpi_scan_init(void); 28int acpi_scan_init(void);
28#ifdef CONFIG_ACPI_PCI_SLOT 29#ifdef CONFIG_ACPI_PCI_SLOT
diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c
index 33e609f63585..2e82e5d76930 100644
--- a/drivers/acpi/numa.c
+++ b/drivers/acpi/numa.c
@@ -159,7 +159,7 @@ acpi_table_print_srat_entry(struct acpi_subtable_header *header)
159 * distance than the others. 159 * distance than the others.
160 * Do some quick checks here and only use the SLIT if it passes. 160 * Do some quick checks here and only use the SLIT if it passes.
161 */ 161 */
162static __init int slit_valid(struct acpi_table_slit *slit) 162static int __init slit_valid(struct acpi_table_slit *slit)
163{ 163{
164 int i, j; 164 int i, j;
165 int d = slit->locality_count; 165 int d = slit->locality_count;
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index 6ab2c3505520..eb95978854a3 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -52,6 +52,7 @@
52#include <acpi/acpi.h> 52#include <acpi/acpi.h>
53#include <acpi/acpi_bus.h> 53#include <acpi/acpi_bus.h>
54#include <acpi/processor.h> 54#include <acpi/processor.h>
55#include "internal.h"
55 56
56#define _COMPONENT ACPI_OS_SERVICES 57#define _COMPONENT ACPI_OS_SERVICES
57ACPI_MODULE_NAME("osl"); 58ACPI_MODULE_NAME("osl");
@@ -1351,8 +1352,8 @@ struct osi_setup_entry {
1351 bool enable; 1352 bool enable;
1352}; 1353};
1353 1354
1354static struct osi_setup_entry __initdata 1355static struct osi_setup_entry
1355 osi_setup_entries[OSI_STRING_ENTRIES_MAX] = { 1356 osi_setup_entries[OSI_STRING_ENTRIES_MAX] __initdata = {
1356 {"Module Device", true}, 1357 {"Module Device", true},
1357 {"Processor Device", true}, 1358 {"Processor Device", true},
1358 {"3.0 _SCP Extensions", true}, 1359 {"3.0 _SCP Extensions", true},
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c
index a5e9f4a5b281..cf34d903f4fb 100644
--- a/drivers/acpi/processor_core.c
+++ b/drivers/acpi/processor_core.c
@@ -28,7 +28,7 @@ static int __init set_no_mwait(const struct dmi_system_id *id)
28 return 0; 28 return 0;
29} 29}
30 30
31static struct dmi_system_id __initdata processor_idle_dmi_table[] = { 31static struct dmi_system_id processor_idle_dmi_table[] __initdata = {
32 { 32 {
33 set_no_mwait, "Extensa 5220", { 33 set_no_mwait, "Extensa 5220", {
34 DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"), 34 DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
diff --git a/drivers/acpi/processor_driver.c b/drivers/acpi/processor_driver.c
index 870eaf5fa547..bd11ef93b0ce 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/scan.c b/drivers/acpi/scan.c
index 8a46c924effd..7d9e285da452 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -999,6 +999,28 @@ struct bus_type acpi_bus_type = {
999 .uevent = acpi_device_uevent, 999 .uevent = acpi_device_uevent,
1000}; 1000};
1001 1001
1002static void acpi_bus_data_handler(acpi_handle handle, void *context)
1003{
1004 /* Intentionally empty. */
1005}
1006
1007int acpi_bus_get_device(acpi_handle handle, struct acpi_device **device)
1008{
1009 acpi_status status;
1010
1011 if (!device)
1012 return -EINVAL;
1013
1014 status = acpi_get_data(handle, acpi_bus_data_handler, (void **)device);
1015 if (ACPI_FAILURE(status) || !*device) {
1016 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No context for object [%p]\n",
1017 handle));
1018 return -ENODEV;
1019 }
1020 return 0;
1021}
1022EXPORT_SYMBOL_GPL(acpi_bus_get_device);
1023
1002int acpi_device_add(struct acpi_device *device, 1024int acpi_device_add(struct acpi_device *device,
1003 void (*release)(struct device *)) 1025 void (*release)(struct device *))
1004{ 1026{
@@ -1210,14 +1232,6 @@ acpi_bus_get_ejd(acpi_handle handle, acpi_handle *ejd)
1210} 1232}
1211EXPORT_SYMBOL_GPL(acpi_bus_get_ejd); 1233EXPORT_SYMBOL_GPL(acpi_bus_get_ejd);
1212 1234
1213void acpi_bus_data_handler(acpi_handle handle, void *context)
1214{
1215
1216 /* TBD */
1217
1218 return;
1219}
1220
1221static int acpi_bus_extract_wakeup_device_power_package(acpi_handle handle, 1235static int acpi_bus_extract_wakeup_device_power_package(acpi_handle handle,
1222 struct acpi_device_wakeup *wakeup) 1236 struct acpi_device_wakeup *wakeup)
1223{ 1237{
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
index 187ab61889e6..72554fd31044 100644
--- a/drivers/acpi/sleep.c
+++ b/drivers/acpi/sleep.c
@@ -141,7 +141,7 @@ static int __init init_nvs_nosave(const struct dmi_system_id *d)
141 return 0; 141 return 0;
142} 142}
143 143
144static struct dmi_system_id __initdata acpisleep_dmi_table[] = { 144static struct dmi_system_id acpisleep_dmi_table[] __initdata = {
145 { 145 {
146 .callback = init_old_suspend_ordering, 146 .callback = init_old_suspend_ordering,
147 .ident = "Abit KN9 (nForce4 variant)", 147 .ident = "Abit KN9 (nForce4 variant)",
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 e1284b8dc6ee..9c4ebfcbe865 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -1577,7 +1577,6 @@ static void acpi_video_bus_notify(struct acpi_device *device, u32 event)
1577 switch (event) { 1577 switch (event) {
1578 case ACPI_VIDEO_NOTIFY_SWITCH: /* User requested a switch, 1578 case ACPI_VIDEO_NOTIFY_SWITCH: /* User requested a switch,
1579 * most likely via hotkey. */ 1579 * most likely via hotkey. */
1580 acpi_bus_generate_proc_event(device, event, 0);
1581 keycode = KEY_SWITCHVIDEOMODE; 1580 keycode = KEY_SWITCHVIDEOMODE;
1582 break; 1581 break;
1583 1582
@@ -1585,20 +1584,16 @@ static void acpi_video_bus_notify(struct acpi_device *device, u32 event)
1585 * connector. */ 1584 * connector. */
1586 acpi_video_device_enumerate(video); 1585 acpi_video_device_enumerate(video);
1587 acpi_video_device_rebind(video); 1586 acpi_video_device_rebind(video);
1588 acpi_bus_generate_proc_event(device, event, 0);
1589 keycode = KEY_SWITCHVIDEOMODE; 1587 keycode = KEY_SWITCHVIDEOMODE;
1590 break; 1588 break;
1591 1589
1592 case ACPI_VIDEO_NOTIFY_CYCLE: /* Cycle Display output hotkey pressed. */ 1590 case ACPI_VIDEO_NOTIFY_CYCLE: /* Cycle Display output hotkey pressed. */
1593 acpi_bus_generate_proc_event(device, event, 0);
1594 keycode = KEY_SWITCHVIDEOMODE; 1591 keycode = KEY_SWITCHVIDEOMODE;
1595 break; 1592 break;
1596 case ACPI_VIDEO_NOTIFY_NEXT_OUTPUT: /* Next Display output hotkey pressed. */ 1593 case ACPI_VIDEO_NOTIFY_NEXT_OUTPUT: /* Next Display output hotkey pressed. */
1597 acpi_bus_generate_proc_event(device, event, 0);
1598 keycode = KEY_VIDEO_NEXT; 1594 keycode = KEY_VIDEO_NEXT;
1599 break; 1595 break;
1600 case ACPI_VIDEO_NOTIFY_PREV_OUTPUT: /* previous Display output hotkey pressed. */ 1596 case ACPI_VIDEO_NOTIFY_PREV_OUTPUT: /* previous Display output hotkey pressed. */
1601 acpi_bus_generate_proc_event(device, event, 0);
1602 keycode = KEY_VIDEO_PREV; 1597 keycode = KEY_VIDEO_PREV;
1603 break; 1598 break;
1604 1599
@@ -1641,31 +1636,26 @@ static void acpi_video_device_notify(acpi_handle handle, u32 event, void *data)
1641 case ACPI_VIDEO_NOTIFY_CYCLE_BRIGHTNESS: /* Cycle brightness */ 1636 case ACPI_VIDEO_NOTIFY_CYCLE_BRIGHTNESS: /* Cycle brightness */
1642 if (brightness_switch_enabled) 1637 if (brightness_switch_enabled)
1643 acpi_video_switch_brightness(video_device, event); 1638 acpi_video_switch_brightness(video_device, event);
1644 acpi_bus_generate_proc_event(device, event, 0);
1645 keycode = KEY_BRIGHTNESS_CYCLE; 1639 keycode = KEY_BRIGHTNESS_CYCLE;
1646 break; 1640 break;
1647 case ACPI_VIDEO_NOTIFY_INC_BRIGHTNESS: /* Increase brightness */ 1641 case ACPI_VIDEO_NOTIFY_INC_BRIGHTNESS: /* Increase brightness */
1648 if (brightness_switch_enabled) 1642 if (brightness_switch_enabled)
1649 acpi_video_switch_brightness(video_device, event); 1643 acpi_video_switch_brightness(video_device, event);
1650 acpi_bus_generate_proc_event(device, event, 0);
1651 keycode = KEY_BRIGHTNESSUP; 1644 keycode = KEY_BRIGHTNESSUP;
1652 break; 1645 break;
1653 case ACPI_VIDEO_NOTIFY_DEC_BRIGHTNESS: /* Decrease brightness */ 1646 case ACPI_VIDEO_NOTIFY_DEC_BRIGHTNESS: /* Decrease brightness */
1654 if (brightness_switch_enabled) 1647 if (brightness_switch_enabled)
1655 acpi_video_switch_brightness(video_device, event); 1648 acpi_video_switch_brightness(video_device, event);
1656 acpi_bus_generate_proc_event(device, event, 0);
1657 keycode = KEY_BRIGHTNESSDOWN; 1649 keycode = KEY_BRIGHTNESSDOWN;
1658 break; 1650 break;
1659 case ACPI_VIDEO_NOTIFY_ZERO_BRIGHTNESS: /* zero brightness */ 1651 case ACPI_VIDEO_NOTIFY_ZERO_BRIGHTNESS: /* zero brightness */
1660 if (brightness_switch_enabled) 1652 if (brightness_switch_enabled)
1661 acpi_video_switch_brightness(video_device, event); 1653 acpi_video_switch_brightness(video_device, event);
1662 acpi_bus_generate_proc_event(device, event, 0);
1663 keycode = KEY_BRIGHTNESS_ZERO; 1654 keycode = KEY_BRIGHTNESS_ZERO;
1664 break; 1655 break;
1665 case ACPI_VIDEO_NOTIFY_DISPLAY_OFF: /* display device off */ 1656 case ACPI_VIDEO_NOTIFY_DISPLAY_OFF: /* display device off */
1666 if (brightness_switch_enabled) 1657 if (brightness_switch_enabled)
1667 acpi_video_switch_brightness(video_device, event); 1658 acpi_video_switch_brightness(video_device, event);
1668 acpi_bus_generate_proc_event(device, event, 0);
1669 keycode = KEY_DISPLAY_OFF; 1659 keycode = KEY_DISPLAY_OFF;
1670 break; 1660 break;
1671 default: 1661 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(&note->device->dev), 274 dev_name(&note->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
4244found: 4241found:
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..be67e5e28d18 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -2022,8 +2022,6 @@ static u32 hotkey_driver_mask; /* events needed by the driver */
2022static u32 hotkey_user_mask; /* events visible to userspace */ 2022static u32 hotkey_user_mask; /* events visible to userspace */
2023static u32 hotkey_acpi_mask; /* events enabled in firmware */ 2023static u32 hotkey_acpi_mask; /* events enabled in firmware */
2024 2024
2025static unsigned int hotkey_report_mode;
2026
2027static u16 *hotkey_keycode_map; 2025static u16 *hotkey_keycode_map;
2028 2026
2029static struct attribute_set *hotkey_dev_attributes; 2027static struct attribute_set *hotkey_dev_attributes;
@@ -2282,10 +2280,6 @@ static struct tp_acpi_drv_struct ibm_hotkey_acpidriver;
2282static void tpacpi_hotkey_send_key(unsigned int scancode) 2280static void tpacpi_hotkey_send_key(unsigned int scancode)
2283{ 2281{
2284 tpacpi_input_send_key_masked(scancode); 2282 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} 2283}
2290 2284
2291static void hotkey_read_nvram(struct tp_nvram_state *n, const u32 m) 2285static void hotkey_read_nvram(struct tp_nvram_state *n, const u32 m)
@@ -2882,18 +2876,6 @@ static void hotkey_tablet_mode_notify_change(void)
2882 "hotkey_tablet_mode"); 2876 "hotkey_tablet_mode");
2883} 2877}
2884 2878
2885/* sysfs hotkey report_mode -------------------------------------------- */
2886static ssize_t hotkey_report_mode_show(struct device *dev,
2887 struct device_attribute *attr,
2888 char *buf)
2889{
2890 return snprintf(buf, PAGE_SIZE, "%d\n",
2891 (hotkey_report_mode != 0) ? hotkey_report_mode : 1);
2892}
2893
2894static struct device_attribute dev_attr_hotkey_report_mode =
2895 __ATTR(hotkey_report_mode, S_IRUGO, hotkey_report_mode_show, NULL);
2896
2897/* sysfs wakeup reason (pollable) -------------------------------------- */ 2879/* sysfs wakeup reason (pollable) -------------------------------------- */
2898static ssize_t hotkey_wakeup_reason_show(struct device *dev, 2880static ssize_t hotkey_wakeup_reason_show(struct device *dev,
2899 struct device_attribute *attr, 2881 struct device_attribute *attr,
@@ -2935,7 +2917,6 @@ static struct attribute *hotkey_attributes[] __initdata = {
2935 &dev_attr_hotkey_enable.attr, 2917 &dev_attr_hotkey_enable.attr,
2936 &dev_attr_hotkey_bios_enabled.attr, 2918 &dev_attr_hotkey_bios_enabled.attr,
2937 &dev_attr_hotkey_bios_mask.attr, 2919 &dev_attr_hotkey_bios_mask.attr,
2938 &dev_attr_hotkey_report_mode.attr,
2939 &dev_attr_hotkey_wakeup_reason.attr, 2920 &dev_attr_hotkey_wakeup_reason.attr,
2940 &dev_attr_hotkey_wakeup_hotunplug_complete.attr, 2921 &dev_attr_hotkey_wakeup_hotunplug_complete.attr,
2941 &dev_attr_hotkey_mask.attr, 2922 &dev_attr_hotkey_mask.attr,
@@ -3439,11 +3420,6 @@ static int __init hotkey_init(struct ibm_init_struct *iibm)
3439 "initial masks: user=0x%08x, fw=0x%08x, poll=0x%08x\n", 3420 "initial masks: user=0x%08x, fw=0x%08x, poll=0x%08x\n",
3440 hotkey_user_mask, hotkey_acpi_mask, hotkey_source_mask); 3421 hotkey_user_mask, hotkey_acpi_mask, hotkey_source_mask);
3441 3422
3442 dbg_printk(TPACPI_DBG_INIT | TPACPI_DBG_HKEY,
3443 "legacy ibm/hotkey event reporting over procfs %s\n",
3444 (hotkey_report_mode < 2) ?
3445 "enabled" : "disabled");
3446
3447 tpacpi_inputdev->open = &hotkey_inputdev_open; 3423 tpacpi_inputdev->open = &hotkey_inputdev_open;
3448 tpacpi_inputdev->close = &hotkey_inputdev_close; 3424 tpacpi_inputdev->close = &hotkey_inputdev_close;
3449 3425
@@ -3737,13 +3713,6 @@ static void hotkey_notify(struct ibm_struct *ibm, u32 event)
3737 "event happened to %s\n", TPACPI_MAIL); 3713 "event happened to %s\n", TPACPI_MAIL);
3738 } 3714 }
3739 3715
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 */ 3716 /* netlink events */
3748 if (!ignore_acpi_ev && send_acpi_ev) { 3717 if (!ignore_acpi_ev && send_acpi_ev) {
3749 acpi_bus_generate_netlink_event( 3718 acpi_bus_generate_netlink_event(
@@ -8840,11 +8809,6 @@ module_param(brightness_enable, uint, 0444);
8840MODULE_PARM_DESC(brightness_enable, 8809MODULE_PARM_DESC(brightness_enable,
8841 "Enables backlight control when 1, disables when 0"); 8810 "Enables backlight control when 1, disables when 0");
8842 8811
8843module_param(hotkey_report_mode, uint, 0444);
8844MODULE_PARM_DESC(hotkey_report_mode,
8845 "used for backwards compatibility with userspace, "
8846 "see documentation");
8847
8848#ifdef CONFIG_THINKPAD_ACPI_ALSA_SUPPORT 8812#ifdef CONFIG_THINKPAD_ACPI_ALSA_SUPPORT
8849module_param_named(volume_mode, volume_mode, uint, 0444); 8813module_param_named(volume_mode, volume_mode, uint, 0444);
8850MODULE_PARM_DESC(volume_mode, 8814MODULE_PARM_DESC(volume_mode,
@@ -8975,10 +8939,6 @@ static int __init thinkpad_acpi_module_init(void)
8975 8939
8976 tpacpi_lifecycle = TPACPI_LIFE_INIT; 8940 tpacpi_lifecycle = TPACPI_LIFE_INIT;
8977 8941
8978 /* Parameter checking */
8979 if (hotkey_report_mode > 2)
8980 return -EINVAL;
8981
8982 /* Driver-level probe */ 8942 /* Driver-level probe */
8983 8943
8984 ret = get_thinkpad_model_data(&thinkpad_id); 8944 ret = get_thinkpad_model_data(&thinkpad_id);