2013-07-03 12:48:44

by Thomas Renninger

[permalink] [raw]
Subject: Remove old /proc/acpi/events and /dev/cpu/microcode interfaces

Please consider to apply for vanilla kernel submission.

Thanks,

Thomas


2013-07-03 12:48:51

by Thomas Renninger

[permalink] [raw]
Subject: [PATCH 2/3] ACPI: Remove old /proc/acpi/event interface

It is quite some time that this one is deprecated.
Get rid of it.

If there should really some important user be overseen it could get reverted
and worked on the userspace program first. But it is time to do something to
get rid of this old stuff...

CC: [email protected]
CC: [email protected]
CC: Rafael J. Wysocki <[email protected]>
CC: Matthew Garrett <[email protected]>
CC: Henrique de Moraes Holschuh <[email protected]>
Signed-off-by: Thomas Renninger <[email protected]>
---
Documentation/laptops/asus-laptop.txt | 8 +-
Documentation/laptops/sony-laptop.txt | 8 +-
Documentation/power/video_extension.txt | 15 -----
drivers/acpi/Kconfig | 18 -----
drivers/acpi/ac.c | 1 -
drivers/acpi/acpi_pad.c | 1 -
drivers/acpi/battery.c | 2 -
drivers/acpi/bus.c | 98 ----------------------------
drivers/acpi/button.c | 2 -
drivers/acpi/event.c | 106 -------------------------------
drivers/acpi/processor_driver.c | 4 -
drivers/acpi/sbs.c | 15 +----
drivers/acpi/thermal.c | 3 -
drivers/acpi/video.c | 10 ---
drivers/platform/x86/asus-laptop.c | 1 -
drivers/platform/x86/eeepc-laptop.c | 1 -
drivers/platform/x86/fujitsu-laptop.c | 4 -
drivers/platform/x86/panasonic-laptop.c | 3 -
drivers/platform/x86/sony-laptop.c | 4 -
drivers/platform/x86/thinkpad_acpi.c | 11 ---
include/acpi/acpi_bus.h | 9 ---
21 files changed, 10 insertions(+), 314 deletions(-)

diff --git a/Documentation/laptops/asus-laptop.txt b/Documentation/laptops/asus-laptop.txt
index 69f9fb3..79a1bc6 100644
--- a/Documentation/laptops/asus-laptop.txt
+++ b/Documentation/laptops/asus-laptop.txt
@@ -8,8 +8,8 @@ http://acpi4asus.sf.net/

This driver provides support for extra features of ACPI-compatible ASUS laptops.
It may also support some MEDION, JVC or VICTOR laptops (such as MEDION 9675 or
- VICTOR XP7210 for example). It makes all the extra buttons generate standard
- ACPI events that go through /proc/acpi/events and input events (like keyboards).
+ VICTOR XP7210 for example). It makes all the extra buttons generate input
+ events (like keyboards).
On some models adds support for changing the display brightness and output,
switching the LCD backlight on and off, and most importantly, allows you to
blink those fancy LEDs intended for reporting mail and wireless status.
@@ -55,8 +55,8 @@ Usage
DSDT) to me.

That's all, now, all the events generated by the hotkeys of your laptop
- should be reported in your /proc/acpi/event entry. You can check with
- "acpi_listen".
+ should be reported via netlink events. You can check with
+ "acpi_genl monitor" (part of the acpica project).

Hotkeys are also reported as input keys (like keyboards) you can check
which key are supported using "xev" under X11.
diff --git a/Documentation/laptops/sony-laptop.txt b/Documentation/laptops/sony-laptop.txt
index 0d5ac7f..978b1e6 100644
--- a/Documentation/laptops/sony-laptop.txt
+++ b/Documentation/laptops/sony-laptop.txt
@@ -12,10 +12,10 @@ Fn keys (hotkeys):
------------------
Some models report hotkeys through the SNC or SPIC devices, such events are
reported both through the ACPI subsystem as acpi events and through the INPUT
-subsystem. See the logs of acpid or /proc/acpi/event and
-/proc/bus/input/devices to find out what those events are and which input
-devices are created by the driver. Additionally, loading the driver with the
-debug option will report all events in the kernel log.
+subsystem. See the logs of /proc/bus/input/devices to find out what those
+events are and which input devices are created by the driver.
+Additionally, loading the driver with the debug option will report all events
+in the kernel log.

The "scancodes" passed to the input system (that can be remapped with udev)
are indexes to the table "sony_laptop_input_keycode_map" in the sony-laptop.c
diff --git a/Documentation/power/video_extension.txt b/Documentation/power/video_extension.txt
index b2f9b15..25ac682 100644
--- a/Documentation/power/video_extension.txt
+++ b/Documentation/power/video_extension.txt
@@ -20,18 +20,3 @@ VGA/CRT : CRT output
VGA/LCD : LCD output
VGA/TVO : TV output
VGA/*/brightness : Used to get/set brightness of output device
-
-Notify event through /proc/acpi/event:
-
-#define ACPI_VIDEO_NOTIFY_SWITCH 0x80
-#define ACPI_VIDEO_NOTIFY_PROBE 0x81
-#define ACPI_VIDEO_NOTIFY_CYCLE 0x82
-#define ACPI_VIDEO_NOTIFY_NEXT_OUTPUT 0x83
-#define ACPI_VIDEO_NOTIFY_PREV_OUTPUT 0x84
-
-#define ACPI_VIDEO_NOTIFY_CYCLE_BRIGHTNESS 0x82
-#define ACPI_VIDEO_NOTIFY_INC_BRIGHTNESS 0x83
-#define ACPI_VIDEO_NOTIFY_DEC_BRIGHTNESS 0x84
-#define ACPI_VIDEO_NOTIFY_ZERO_BRIGHTNESS 0x85
-#define ACPI_VIDEO_NOTIFY_DISPLAY_OFF 0x86
-
diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
index 100bd72..3278a21 100644
--- a/drivers/acpi/Kconfig
+++ b/drivers/acpi/Kconfig
@@ -91,24 +91,6 @@ config ACPI_EC_DEBUGFS
Thus this option is a debug option that helps to write ACPI drivers
and can be used to identify ACPI code or EC firmware bugs.

-config ACPI_PROC_EVENT
- bool "Deprecated /proc/acpi/event support"
- depends on PROC_FS
- default y
- help
- A user-space daemon, acpid, typically reads /proc/acpi/event
- and handles all ACPI-generated events.
-
- These events are now delivered to user-space either
- via the input layer or as netlink events.
-
- This build option enables the old code for legacy
- user-space implementation. After some time, this will
- be moved under CONFIG_ACPI_PROCFS, and then deleted.
-
- Say Y here to retain the old behaviour. Say N if your
- user-space is newer than kernel 2.6.23 (September 2007).
-
config ACPI_AC
tristate "AC Adapter"
depends on X86
diff --git a/drivers/acpi/ac.c b/drivers/acpi/ac.c
index 4f4e741..f37beaa3 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)
msleep(ac_sleep_before_get_state_ms);

acpi_ac_get_state(ac);
- acpi_bus_generate_proc_event(device, event, (u32) ac->state);
acpi_bus_generate_netlink_event(device->pnp.device_class,
dev_name(&device->dev), event,
(u32) ac->state);
diff --git a/drivers/acpi/acpi_pad.c b/drivers/acpi/acpi_pad.c
index 27bb6a9..6230637 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,
switch (event) {
case ACPI_PROCESSOR_AGGREGATOR_NOTIFY:
acpi_pad_handle_notify(handle);
- acpi_bus_generate_proc_event(device, event, 0);
acpi_bus_generate_netlink_event(device->pnp.device_class,
dev_name(&device->dev), event, 0);
break;
diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
index e710045..5f6b595 100644
--- a/drivers/acpi/battery.c
+++ b/drivers/acpi/battery.c
@@ -1034,8 +1034,6 @@ static void acpi_battery_notify(struct acpi_device *device, u32 event)
if (event == ACPI_BATTERY_NOTIFY_INFO)
acpi_battery_refresh(battery);
acpi_battery_update(battery);
- acpi_bus_generate_proc_event(device, event,
- acpi_battery_present(battery));
acpi_bus_generate_netlink_event(device->pnp.device_class,
dev_name(&device->dev), event,
acpi_battery_present(battery));
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index 292de3c..2a0d8d2 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -347,104 +347,6 @@ static void acpi_bus_osc_support(void)
}

/* --------------------------------------------------------------------------
- Event Management
- -------------------------------------------------------------------------- */
-
-#ifdef CONFIG_ACPI_PROC_EVENT
-static DEFINE_SPINLOCK(acpi_bus_event_lock);
-
-LIST_HEAD(acpi_bus_event_list);
-DECLARE_WAIT_QUEUE_HEAD(acpi_bus_event_queue);
-
-extern int event_is_open;
-
-int acpi_bus_generate_proc_event4(const char *device_class, const char *bus_id, u8 type, int data)
-{
- struct acpi_bus_event *event;
- unsigned long flags = 0;
-
- /* drop event on the floor if no one's listening */
- if (!event_is_open)
- return 0;
-
- event = kzalloc(sizeof(struct acpi_bus_event), GFP_ATOMIC);
- if (!event)
- return -ENOMEM;
-
- strcpy(event->device_class, device_class);
- strcpy(event->bus_id, bus_id);
- event->type = type;
- event->data = data;
-
- spin_lock_irqsave(&acpi_bus_event_lock, flags);
- list_add_tail(&event->node, &acpi_bus_event_list);
- spin_unlock_irqrestore(&acpi_bus_event_lock, flags);
-
- wake_up_interruptible(&acpi_bus_event_queue);
-
- return 0;
-
-}
-
-EXPORT_SYMBOL_GPL(acpi_bus_generate_proc_event4);
-
-int acpi_bus_generate_proc_event(struct acpi_device *device, u8 type, int data)
-{
- if (!device)
- return -EINVAL;
- return acpi_bus_generate_proc_event4(device->pnp.device_class,
- device->pnp.bus_id, type, data);
-}
-
-EXPORT_SYMBOL(acpi_bus_generate_proc_event);
-
-int acpi_bus_receive_event(struct acpi_bus_event *event)
-{
- unsigned long flags = 0;
- struct acpi_bus_event *entry = NULL;
-
- DECLARE_WAITQUEUE(wait, current);
-
-
- if (!event)
- return -EINVAL;
-
- if (list_empty(&acpi_bus_event_list)) {
-
- set_current_state(TASK_INTERRUPTIBLE);
- add_wait_queue(&acpi_bus_event_queue, &wait);
-
- if (list_empty(&acpi_bus_event_list))
- schedule();
-
- remove_wait_queue(&acpi_bus_event_queue, &wait);
- set_current_state(TASK_RUNNING);
-
- if (signal_pending(current))
- return -ERESTARTSYS;
- }
-
- spin_lock_irqsave(&acpi_bus_event_lock, flags);
- if (!list_empty(&acpi_bus_event_list)) {
- entry = list_entry(acpi_bus_event_list.next,
- struct acpi_bus_event, node);
- list_del(&entry->node);
- }
- spin_unlock_irqrestore(&acpi_bus_event_lock, flags);
-
- if (!entry)
- return -ENODEV;
-
- memcpy(event, entry, sizeof(struct acpi_bus_event));
-
- kfree(entry);
-
- return 0;
-}
-
-#endif /* CONFIG_ACPI_PROC_EVENT */
-
-/* --------------------------------------------------------------------------
Notification Handling
-------------------------------------------------------------------------- */

diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c
index d2e617b..a557738 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)

pm_wakeup_event(&device->dev, 0);
}
-
- acpi_bus_generate_proc_event(device, event, ++button->pushed);
break;
default:
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
diff --git a/drivers/acpi/event.c b/drivers/acpi/event.c
index 1442737..8247fcd 100644
--- a/drivers/acpi/event.c
+++ b/drivers/acpi/event.c
@@ -21,100 +21,6 @@
#define _COMPONENT ACPI_SYSTEM_COMPONENT
ACPI_MODULE_NAME("event");

-#ifdef CONFIG_ACPI_PROC_EVENT
-/* Global vars for handling event proc entry */
-static DEFINE_SPINLOCK(acpi_system_event_lock);
-int event_is_open = 0;
-extern struct list_head acpi_bus_event_list;
-extern wait_queue_head_t acpi_bus_event_queue;
-
-static int acpi_system_open_event(struct inode *inode, struct file *file)
-{
- spin_lock_irq(&acpi_system_event_lock);
-
- if (event_is_open)
- goto out_busy;
-
- event_is_open = 1;
-
- spin_unlock_irq(&acpi_system_event_lock);
- return 0;
-
- out_busy:
- spin_unlock_irq(&acpi_system_event_lock);
- return -EBUSY;
-}
-
-static ssize_t
-acpi_system_read_event(struct file *file, char __user * buffer, size_t count,
- loff_t * ppos)
-{
- int result = 0;
- struct acpi_bus_event event;
- static char str[ACPI_MAX_STRING];
- static int chars_remaining = 0;
- static char *ptr;
-
- if (!chars_remaining) {
- memset(&event, 0, sizeof(struct acpi_bus_event));
-
- if ((file->f_flags & O_NONBLOCK)
- && (list_empty(&acpi_bus_event_list)))
- return -EAGAIN;
-
- result = acpi_bus_receive_event(&event);
- if (result)
- return result;
-
- chars_remaining = sprintf(str, "%s %s %08x %08x\n",
- event.device_class ? event.
- device_class : "<unknown>",
- event.bus_id ? event.
- bus_id : "<unknown>", event.type,
- event.data);
- ptr = str;
- }
-
- if (chars_remaining < count) {
- count = chars_remaining;
- }
-
- if (copy_to_user(buffer, ptr, count))
- return -EFAULT;
-
- *ppos += count;
- chars_remaining -= count;
- ptr += count;
-
- return count;
-}
-
-static int acpi_system_close_event(struct inode *inode, struct file *file)
-{
- spin_lock_irq(&acpi_system_event_lock);
- event_is_open = 0;
- spin_unlock_irq(&acpi_system_event_lock);
- return 0;
-}
-
-static unsigned int acpi_system_poll_event(struct file *file, poll_table * wait)
-{
- poll_wait(file, &acpi_bus_event_queue, wait);
- if (!list_empty(&acpi_bus_event_list))
- return POLLIN | POLLRDNORM;
- return 0;
-}
-
-static const struct file_operations acpi_system_event_ops = {
- .owner = THIS_MODULE,
- .open = acpi_system_open_event,
- .read = acpi_system_read_event,
- .release = acpi_system_close_event,
- .poll = acpi_system_poll_event,
- .llseek = default_llseek,
-};
-#endif /* CONFIG_ACPI_PROC_EVENT */
-
/* ACPI notifier chain */
static BLOCKING_NOTIFIER_HEAD(acpi_chain_head);

@@ -280,9 +186,6 @@ static int acpi_event_genetlink_init(void)

static int __init acpi_event_init(void)
{
-#ifdef CONFIG_ACPI_PROC_EVENT
- struct proc_dir_entry *entry;
-#endif
int error = 0;

if (acpi_disabled)
@@ -293,15 +196,6 @@ static int __init acpi_event_init(void)
if (error)
printk(KERN_WARNING PREFIX
"Failed to create genetlink family for ACPI event\n");
-
-#ifdef CONFIG_ACPI_PROC_EVENT
- /* 'event' [R] */
- entry = proc_create("event", S_IRUSR, acpi_root_dir,
- &acpi_system_event_ops);
- if (!entry)
- return -ENODEV;
-#endif
-
return 0;
}

diff --git a/drivers/acpi/processor_driver.c b/drivers/acpi/processor_driver.c
index c266cdc..c3a727e 100644
--- a/drivers/acpi/processor_driver.c
+++ b/drivers/acpi/processor_driver.c
@@ -393,21 +393,17 @@ static void acpi_processor_notify(struct acpi_device *device, u32 event)
acpi_processor_ppc_has_changed(pr, 1);
if (saved == pr->performance_platform_limit)
break;
- acpi_bus_generate_proc_event(device, event,
- pr->performance_platform_limit);
acpi_bus_generate_netlink_event(device->pnp.device_class,
dev_name(&device->dev), event,
pr->performance_platform_limit);
break;
case ACPI_PROCESSOR_NOTIFY_POWER:
acpi_processor_cst_has_changed(pr);
- acpi_bus_generate_proc_event(device, event, 0);
acpi_bus_generate_netlink_event(device->pnp.device_class,
dev_name(&device->dev), event, 0);
break;
case ACPI_PROCESSOR_NOTIFY_THROTTLING:
acpi_processor_tstate_has_changed(pr);
- acpi_bus_generate_proc_event(device, event, 0);
acpi_bus_generate_netlink_event(device->pnp.device_class,
dev_name(&device->dev), event, 0);
break;
diff --git a/drivers/acpi/sbs.c b/drivers/acpi/sbs.c
index b6241ee..aef7e1c 100644
--- a/drivers/acpi/sbs.c
+++ b/drivers/acpi/sbs.c
@@ -873,14 +873,9 @@ static void acpi_sbs_callback(void *context)
u8 saved_charger_state = sbs->charger_present;
u8 saved_battery_state;
acpi_ac_get_present(sbs);
- if (sbs->charger_present != saved_charger_state) {
-#ifdef CONFIG_ACPI_PROC_EVENT
- acpi_bus_generate_proc_event4(ACPI_AC_CLASS, ACPI_AC_DIR_NAME,
- ACPI_SBS_NOTIFY_STATUS,
- sbs->charger_present);
-#endif
+ if (sbs->charger_present != saved_charger_state)
kobject_uevent(&sbs->charger.dev->kobj, KOBJ_CHANGE);
- }
+
if (sbs->manager_present) {
for (id = 0; id < MAX_SBS_BAT; ++id) {
if (!(sbs->batteries_supported & (1 << id)))
@@ -890,12 +885,6 @@ static void acpi_sbs_callback(void *context)
acpi_battery_read(bat);
if (saved_battery_state == bat->present)
continue;
-#ifdef CONFIG_ACPI_PROC_EVENT
- acpi_bus_generate_proc_event4(ACPI_BATTERY_CLASS,
- bat->name,
- ACPI_SBS_NOTIFY_STATUS,
- bat->present);
-#endif
kobject_uevent(&bat->bat.dev->kobj, KOBJ_CHANGE);
}
}
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index a33821c..547a906 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,
else
return 0;

- acpi_bus_generate_proc_event(tz->device, type, 1);
acpi_bus_generate_netlink_event(tz->device->pnp.device_class,
dev_name(&tz->device->dev), type, 1);

@@ -980,14 +979,12 @@ static void acpi_thermal_notify(struct acpi_device *device, u32 event)
case ACPI_THERMAL_NOTIFY_THRESHOLDS:
acpi_thermal_trips_update(tz, ACPI_TRIPS_REFRESH_THRESHOLDS);
acpi_thermal_check(tz);
- acpi_bus_generate_proc_event(device, event, 0);
acpi_bus_generate_netlink_event(device->pnp.device_class,
dev_name(&device->dev), event, 0);
break;
case ACPI_THERMAL_NOTIFY_DEVICES:
acpi_thermal_trips_update(tz, ACPI_TRIPS_REFRESH_DEVICES);
acpi_thermal_check(tz);
- acpi_bus_generate_proc_event(device, event, 0);
acpi_bus_generate_netlink_event(device->pnp.device_class,
dev_name(&device->dev), event, 0);
break;
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index 440eadf..8910fdf 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -1556,7 +1556,6 @@ static void acpi_video_bus_notify(struct acpi_device *device, u32 event)
switch (event) {
case ACPI_VIDEO_NOTIFY_SWITCH: /* User requested a switch,
* most likely via hotkey. */
- acpi_bus_generate_proc_event(device, event, 0);
keycode = KEY_SWITCHVIDEOMODE;
break;

@@ -1564,20 +1563,16 @@ static void acpi_video_bus_notify(struct acpi_device *device, u32 event)
* connector. */
acpi_video_device_enumerate(video);
acpi_video_device_rebind(video);
- acpi_bus_generate_proc_event(device, event, 0);
keycode = KEY_SWITCHVIDEOMODE;
break;

case ACPI_VIDEO_NOTIFY_CYCLE: /* Cycle Display output hotkey pressed. */
- acpi_bus_generate_proc_event(device, event, 0);
keycode = KEY_SWITCHVIDEOMODE;
break;
case ACPI_VIDEO_NOTIFY_NEXT_OUTPUT: /* Next Display output hotkey pressed. */
- acpi_bus_generate_proc_event(device, event, 0);
keycode = KEY_VIDEO_NEXT;
break;
case ACPI_VIDEO_NOTIFY_PREV_OUTPUT: /* previous Display output hotkey pressed. */
- acpi_bus_generate_proc_event(device, event, 0);
keycode = KEY_VIDEO_PREV;
break;

@@ -1620,31 +1615,26 @@ static void acpi_video_device_notify(acpi_handle handle, u32 event, void *data)
case ACPI_VIDEO_NOTIFY_CYCLE_BRIGHTNESS: /* Cycle brightness */
if (brightness_switch_enabled)
acpi_video_switch_brightness(video_device, event);
- acpi_bus_generate_proc_event(device, event, 0);
keycode = KEY_BRIGHTNESS_CYCLE;
break;
case ACPI_VIDEO_NOTIFY_INC_BRIGHTNESS: /* Increase brightness */
if (brightness_switch_enabled)
acpi_video_switch_brightness(video_device, event);
- acpi_bus_generate_proc_event(device, event, 0);
keycode = KEY_BRIGHTNESSUP;
break;
case ACPI_VIDEO_NOTIFY_DEC_BRIGHTNESS: /* Decrease brightness */
if (brightness_switch_enabled)
acpi_video_switch_brightness(video_device, event);
- acpi_bus_generate_proc_event(device, event, 0);
keycode = KEY_BRIGHTNESSDOWN;
break;
case ACPI_VIDEO_NOTIFY_ZERO_BRIGHTNESS: /* zero brightness */
if (brightness_switch_enabled)
acpi_video_switch_brightness(video_device, event);
- acpi_bus_generate_proc_event(device, event, 0);
keycode = KEY_BRIGHTNESS_ZERO;
break;
case ACPI_VIDEO_NOTIFY_DISPLAY_OFF: /* display device off */
if (brightness_switch_enabled)
acpi_video_switch_brightness(video_device, event);
- acpi_bus_generate_proc_event(device, event, 0);
keycode = KEY_DISPLAY_OFF;
break;
default:
diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/asus-laptop.c
index 0eea09c..9d1d1c2 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)

/* TODO Find a better way to handle events count. */
count = asus->event_count[event % 128]++;
- acpi_bus_generate_proc_event(asus->device, event, count);
acpi_bus_generate_netlink_event(asus->device->pnp.device_class,
dev_name(&asus->device->dev), event,
count);
diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c
index 5d26e70..a6afd41 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)
if (event > ACPI_MAX_SYS_NOTIFY)
return;
count = eeepc->event_count[event % 128]++;
- acpi_bus_generate_proc_event(device, event, count);
acpi_bus_generate_netlink_event(device->pnp.device_class,
dev_name(&device->dev), event,
count);
diff --git a/drivers/platform/x86/fujitsu-laptop.c b/drivers/platform/x86/fujitsu-laptop.c
index 1c9386e..52b8a97 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)
else
set_lcd_level(newb);
}
- acpi_bus_generate_proc_event(fujitsu->dev,
- ACPI_VIDEO_NOTIFY_INC_BRIGHTNESS, 0);
keycode = KEY_BRIGHTNESSUP;
} else if (oldb > newb) {
if (disable_brightness_adjust != 1) {
@@ -783,8 +781,6 @@ static void acpi_fujitsu_notify(struct acpi_device *device, u32 event)
else
set_lcd_level(newb);
}
- acpi_bus_generate_proc_event(fujitsu->dev,
- ACPI_VIDEO_NOTIFY_DEC_BRIGHTNESS, 0);
keycode = KEY_BRIGHTNESSDOWN;
}
break;
diff --git a/drivers/platform/x86/panasonic-laptop.c b/drivers/platform/x86/panasonic-laptop.c
index 4add9a3..984253d 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)
"error getting hotkey status\n"));
return;
}
-
- acpi_bus_generate_proc_event(pcc->device, HKEY_NOTIFY, result);
-
if (!sparse_keymap_report_event(hotk_input_dev,
result & 0xf, result & 0x80, false))
ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c
index 2ac045f..069821b 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)
ev_type = HOTKEY;
sony_laptop_report_input_event(real_ev);
}
-
- acpi_bus_generate_proc_event(sony_nc_acpi_device, ev_type, real_ev);
-
acpi_bus_generate_netlink_event(sony_nc_acpi_device->pnp.device_class,
dev_name(&sony_nc_acpi_device->dev), ev_type, real_ev);
}
@@ -4243,7 +4240,6 @@ static irqreturn_t sony_pic_irq(int irq, void *dev_id)

found:
sony_laptop_report_input_event(device_event);
- acpi_bus_generate_proc_event(dev->acpi_dev, 1, device_event);
sonypi_compat_report_event(device_event);
return IRQ_HANDLED;
}
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index 54d31c0..e946c0d 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -2282,10 +2282,6 @@ static struct tp_acpi_drv_struct ibm_hotkey_acpidriver;
static void tpacpi_hotkey_send_key(unsigned int scancode)
{
tpacpi_input_send_key_masked(scancode);
- if (hotkey_report_mode < 2) {
- acpi_bus_generate_proc_event(ibm_hotkey_acpidriver.device,
- 0x80, TP_HKEY_EV_HOTKEY_BASE + scancode);
- }
}

static void hotkey_read_nvram(struct tp_nvram_state *n, const u32 m)
@@ -3737,13 +3733,6 @@ static void hotkey_notify(struct ibm_struct *ibm, u32 event)
"event happened to %s\n", TPACPI_MAIL);
}

- /* Legacy events */
- if (!ignore_acpi_ev &&
- (send_acpi_ev || hotkey_report_mode < 2)) {
- acpi_bus_generate_proc_event(ibm->acpi->device,
- event, hkey);
- }
-
/* netlink events */
if (!ignore_acpi_ev && send_acpi_ev) {
acpi_bus_generate_netlink_event(
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index c13c919..09ce5b3 100644
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -392,15 +392,6 @@ bool acpi_bus_can_wakeup(acpi_handle handle);
static inline bool acpi_bus_can_wakeup(acpi_handle handle) { return false; }
#endif

-#ifdef CONFIG_ACPI_PROC_EVENT
-int acpi_bus_generate_proc_event(struct acpi_device *device, u8 type, int data);
-int acpi_bus_generate_proc_event4(const char *class, const char *bid, u8 type, int data);
-int acpi_bus_receive_event(struct acpi_bus_event *event);
-#else
-static inline int acpi_bus_generate_proc_event(struct acpi_device *device, u8 type, int data)
- { return 0; }
-#endif
-
void acpi_scan_lock_acquire(void);
void acpi_scan_lock_release(void);
int acpi_scan_add_handler(struct acpi_scan_handler *handler);
--
1.7.6.1

2013-07-03 12:49:12

by Thomas Renninger

[permalink] [raw]
Subject: [PATCH 1/3] x86 microcode: Remove old MICROCODE_OLD_INTERFACE

SLE11 nowadays makes use of the new interface without doing any modifications
to the kernel in this area. That means the old interface is not needed at
least since 3.0 or longer.

Time to get rid of it.


CC: Arjan van de Ven <[email protected]>
CC: [email protected]
Signed-off-by: Thomas Renninger <[email protected]>
---
arch/x86/Kconfig | 4 --
arch/x86/kernel/microcode_core.c | 103 --------------------------------------
2 files changed, 0 insertions(+), 107 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index fe120da..01dae97 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -1049,10 +1049,6 @@ config MICROCODE_AMD
If you select this option, microcode patch loading support for AMD
processors will be enabled.

-config MICROCODE_OLD_INTERFACE
- def_bool y
- depends on MICROCODE
-
config MICROCODE_INTEL_LIB
def_bool y
depends on MICROCODE_INTEL
diff --git a/arch/x86/kernel/microcode_core.c b/arch/x86/kernel/microcode_core.c
index 22db92b..6a9fd04 100644
--- a/arch/x86/kernel/microcode_core.c
+++ b/arch/x86/kernel/microcode_core.c
@@ -180,99 +180,6 @@ static int apply_microcode_on_target(int cpu)
return ret;
}

-#ifdef CONFIG_MICROCODE_OLD_INTERFACE
-static int do_microcode_update(const void __user *buf, size_t size)
-{
- int error = 0;
- int cpu;
-
- for_each_online_cpu(cpu) {
- struct ucode_cpu_info *uci = ucode_cpu_info + cpu;
- enum ucode_state ustate;
-
- if (!uci->valid)
- continue;
-
- ustate = microcode_ops->request_microcode_user(cpu, buf, size);
- if (ustate == UCODE_ERROR) {
- error = -1;
- break;
- } else if (ustate == UCODE_OK)
- apply_microcode_on_target(cpu);
- }
-
- return error;
-}
-
-static int microcode_open(struct inode *inode, struct file *file)
-{
- return capable(CAP_SYS_RAWIO) ? nonseekable_open(inode, file) : -EPERM;
-}
-
-static ssize_t microcode_write(struct file *file, const char __user *buf,
- size_t len, loff_t *ppos)
-{
- ssize_t ret = -EINVAL;
-
- if ((len >> PAGE_SHIFT) > totalram_pages) {
- pr_err("too much data (max %ld pages)\n", totalram_pages);
- return ret;
- }
-
- get_online_cpus();
- mutex_lock(&microcode_mutex);
-
- if (do_microcode_update(buf, len) == 0)
- ret = (ssize_t)len;
-
- if (ret > 0)
- perf_check_microcode();
-
- mutex_unlock(&microcode_mutex);
- put_online_cpus();
-
- return ret;
-}
-
-static const struct file_operations microcode_fops = {
- .owner = THIS_MODULE,
- .write = microcode_write,
- .open = microcode_open,
- .llseek = no_llseek,
-};
-
-static struct miscdevice microcode_dev = {
- .minor = MICROCODE_MINOR,
- .name = "microcode",
- .nodename = "cpu/microcode",
- .fops = &microcode_fops,
-};
-
-static int __init microcode_dev_init(void)
-{
- int error;
-
- error = misc_register(&microcode_dev);
- if (error) {
- pr_err("can't misc_register on minor=%d\n", MICROCODE_MINOR);
- return error;
- }
-
- return 0;
-}
-
-static void __exit microcode_dev_exit(void)
-{
- misc_deregister(&microcode_dev);
-}
-
-MODULE_ALIAS_MISCDEV(MICROCODE_MINOR);
-MODULE_ALIAS("devname:cpu/microcode");
-#else
-#define microcode_dev_init() 0
-#define microcode_dev_exit() do { } while (0)
-#endif
-
/* fake device for request_firmware */
static struct platform_device *microcode_pdev;

@@ -581,10 +488,6 @@ static int __init microcode_init(void)
goto out_driver;
}

- error = microcode_dev_init();
- if (error)
- goto out_ucode_group;
-
register_syscore_ops(&mc_syscore_ops);
register_hotcpu_notifier(&mc_cpu_notifier);

@@ -593,10 +496,6 @@ static int __init microcode_init(void)

return 0;

- out_ucode_group:
- sysfs_remove_group(&cpu_subsys.dev_root->kobj,
- &cpu_root_microcode_group);
-
out_driver:
get_online_cpus();
mutex_lock(&microcode_mutex);
@@ -617,8 +516,6 @@ static void __exit microcode_exit(void)
{
struct cpuinfo_x86 *c = &cpu_data(0);

- microcode_dev_exit();
-
unregister_hotcpu_notifier(&mc_cpu_notifier);
unregister_syscore_ops(&mc_syscore_ops);

--
1.7.6.1

2013-07-03 12:49:36

by Thomas Renninger

[permalink] [raw]
Subject: [PATCH 3/3] platform thinkpad: Remove deprecated hotkey_report_mode parameter

It is somewhat strange that the default value to support the depracated
interface is set (1).
Anyway this exists for years. The previous patch already removed the
functionality to still export specific events through /proc. Now this param
is useless and should vanish as well.

CC: Henrique de Moraes Holschuh <[email protected]>
Signed-off-by: Thomas Renninger <[email protected]>
---
Documentation/laptops/thinkpad-acpi.txt | 73 +++----------------------------
drivers/platform/x86/thinkpad_acpi.c | 29 ------------
2 files changed, 6 insertions(+), 96 deletions(-)

diff --git a/Documentation/laptops/thinkpad-acpi.txt b/Documentation/laptops/thinkpad-acpi.txt
index cf7bc6c..86c5236 100644
--- a/Documentation/laptops/thinkpad-acpi.txt
+++ b/Documentation/laptops/thinkpad-acpi.txt
@@ -329,20 +329,6 @@ sysfs notes:

This attribute has poll()/select() support.

- hotkey_report_mode:
- Returns the state of the procfs ACPI event report mode
- filter for hot keys. If it is set to 1 (the default),
- all hot key presses are reported both through the input
- layer and also as ACPI events through procfs (but not
- through netlink). If it is set to 2, hot key presses
- are reported only through the input layer.
-
- This attribute is read-only in kernels 2.6.23 or later,
- and read-write on earlier kernels.
-
- May return -EPERM (write access locked out by module
- parameter) or -EACCES (read-only).
-
wakeup_reason:
Set to 1 if the system is waking up because the user
requested a bay ejection. Set to 2 if the system is
@@ -518,24 +504,21 @@ SW_TABLET_MODE Tablet ThinkPads HKEY events 0x5009 and 0x500A
Non hotkey ACPI HKEY event map:
-------------------------------

-Events that are not propagated by the driver, except for legacy
-compatibility purposes when hotkey_report_mode is set to 1:
-
-0x5001 Lid closed
-0x5002 Lid opened
-0x5009 Tablet swivel: switched to tablet mode
-0x500A Tablet swivel: switched to normal mode
-0x7000 Radio Switch may have changed state
-
Events that are never propagated by the driver:

0x2304 System is waking up from suspend to undock
0x2305 System is waking up from suspend to eject bay
0x2404 System is waking up from hibernation to undock
0x2405 System is waking up from hibernation to eject bay
+0x5001 Lid closed
+0x5002 Lid opened
+0x5009 Tablet swivel: switched to tablet mode
+0x500A Tablet swivel: switched to normal mode
0x5010 Brightness level changed/control event
0x6000 KEYBOARD: Numlock key pressed
0x6005 KEYBOARD: Fn key pressed (TO BE VERIFIED)
+0x7000 Radio Switch may have changed state
+

Events that are propagated by the driver to userspace:

@@ -574,50 +557,6 @@ operating system is to force either an immediate suspend or hibernate
cycle, or a system shutdown. Obviously, something is very wrong if this
happens.

-Compatibility notes:
-
-ibm-acpi and thinkpad-acpi 0.15 (mainline kernels before 2.6.23) never
-supported the input layer, and sent events over the procfs ACPI event
-interface.
-
-To avoid sending duplicate events over the input layer and the ACPI
-event interface, thinkpad-acpi 0.16 implements a module parameter
-(hotkey_report_mode), and also a sysfs device attribute with the same
-name.
-
-Make no mistake here: userspace is expected to switch to using the input
-layer interface of thinkpad-acpi, together with the ACPI netlink event
-interface in kernels 2.6.23 and later, or with the ACPI procfs event
-interface in kernels 2.6.22 and earlier.
-
-If no hotkey_report_mode module parameter is specified (or it is set to
-zero), the driver defaults to mode 1 (see below), and on kernels 2.6.22
-and earlier, also allows one to change the hotkey_report_mode through
-sysfs. In kernels 2.6.23 and later, where the netlink ACPI event
-interface is available, hotkey_report_mode cannot be changed through
-sysfs (it is read-only).
-
-If the hotkey_report_mode module parameter is set to 1 or 2, it cannot
-be changed later through sysfs (any writes will return -EPERM to signal
-that hotkey_report_mode was locked. On 2.6.23 and later, where
-hotkey_report_mode cannot be changed at all, writes will return -EACCES).
-
-hotkey_report_mode set to 1 makes the driver export through the procfs
-ACPI event interface all hot key presses (which are *also* sent to the
-input layer). This is a legacy compatibility behaviour, and it is also
-the default mode of operation for the driver.
-
-hotkey_report_mode set to 2 makes the driver filter out the hot key
-presses from the procfs ACPI event interface, so these events will only
-be sent through the input layer. Userspace that has been updated to use
-the thinkpad-acpi input layer interface should set hotkey_report_mode to
-2.
-
-Hot key press events are never sent to the ACPI netlink event interface.
-Really up-to-date userspace under kernel 2.6.23 and later is to use the
-netlink interface and the input layer interface, and don't bother at all
-with hotkey_report_mode.
-

Brightness hotkey notes:

diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index e946c0d..be67e5e 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 */
static u32 hotkey_user_mask; /* events visible to userspace */
static u32 hotkey_acpi_mask; /* events enabled in firmware */

-static unsigned int hotkey_report_mode;
-
static u16 *hotkey_keycode_map;

static struct attribute_set *hotkey_dev_attributes;
@@ -2878,18 +2876,6 @@ static void hotkey_tablet_mode_notify_change(void)
"hotkey_tablet_mode");
}

-/* sysfs hotkey report_mode -------------------------------------------- */
-static ssize_t hotkey_report_mode_show(struct device *dev,
- struct device_attribute *attr,
- char *buf)
-{
- return snprintf(buf, PAGE_SIZE, "%d\n",
- (hotkey_report_mode != 0) ? hotkey_report_mode : 1);
-}
-
-static struct device_attribute dev_attr_hotkey_report_mode =
- __ATTR(hotkey_report_mode, S_IRUGO, hotkey_report_mode_show, NULL);
-
/* sysfs wakeup reason (pollable) -------------------------------------- */
static ssize_t hotkey_wakeup_reason_show(struct device *dev,
struct device_attribute *attr,
@@ -2931,7 +2917,6 @@ static struct attribute *hotkey_attributes[] __initdata = {
&dev_attr_hotkey_enable.attr,
&dev_attr_hotkey_bios_enabled.attr,
&dev_attr_hotkey_bios_mask.attr,
- &dev_attr_hotkey_report_mode.attr,
&dev_attr_hotkey_wakeup_reason.attr,
&dev_attr_hotkey_wakeup_hotunplug_complete.attr,
&dev_attr_hotkey_mask.attr,
@@ -3435,11 +3420,6 @@ static int __init hotkey_init(struct ibm_init_struct *iibm)
"initial masks: user=0x%08x, fw=0x%08x, poll=0x%08x\n",
hotkey_user_mask, hotkey_acpi_mask, hotkey_source_mask);

- dbg_printk(TPACPI_DBG_INIT | TPACPI_DBG_HKEY,
- "legacy ibm/hotkey event reporting over procfs %s\n",
- (hotkey_report_mode < 2) ?
- "enabled" : "disabled");
-
tpacpi_inputdev->open = &hotkey_inputdev_open;
tpacpi_inputdev->close = &hotkey_inputdev_close;

@@ -8829,11 +8809,6 @@ module_param(brightness_enable, uint, 0444);
MODULE_PARM_DESC(brightness_enable,
"Enables backlight control when 1, disables when 0");

-module_param(hotkey_report_mode, uint, 0444);
-MODULE_PARM_DESC(hotkey_report_mode,
- "used for backwards compatibility with userspace, "
- "see documentation");
-
#ifdef CONFIG_THINKPAD_ACPI_ALSA_SUPPORT
module_param_named(volume_mode, volume_mode, uint, 0444);
MODULE_PARM_DESC(volume_mode,
@@ -8964,10 +8939,6 @@ static int __init thinkpad_acpi_module_init(void)

tpacpi_lifecycle = TPACPI_LIFE_INIT;

- /* Parameter checking */
- if (hotkey_report_mode > 2)
- return -EINVAL;
-
/* Driver-level probe */

ret = get_thinkpad_model_data(&thinkpad_id);
--
1.7.6.1

2013-07-03 21:46:53

by Rafael J. Wysocki

[permalink] [raw]
Subject: Re: [PATCH 2/3] ACPI: Remove old /proc/acpi/event interface

On Wednesday, July 03, 2013 02:48:38 PM Thomas Renninger wrote:
> It is quite some time that this one is deprecated.
> Get rid of it.
>
> If there should really some important user be overseen it could get reverted
> and worked on the userspace program first. But it is time to do something to
> get rid of this old stuff...

Does this patch depend on the other patches in this series?

Rafael


> CC: [email protected]
> CC: [email protected]
> CC: Rafael J. Wysocki <[email protected]>
> CC: Matthew Garrett <[email protected]>
> CC: Henrique de Moraes Holschuh <[email protected]>
> Signed-off-by: Thomas Renninger <[email protected]>
> ---
> Documentation/laptops/asus-laptop.txt | 8 +-
> Documentation/laptops/sony-laptop.txt | 8 +-
> Documentation/power/video_extension.txt | 15 -----
> drivers/acpi/Kconfig | 18 -----
> drivers/acpi/ac.c | 1 -
> drivers/acpi/acpi_pad.c | 1 -
> drivers/acpi/battery.c | 2 -
> drivers/acpi/bus.c | 98 ----------------------------
> drivers/acpi/button.c | 2 -
> drivers/acpi/event.c | 106 -------------------------------
> drivers/acpi/processor_driver.c | 4 -
> drivers/acpi/sbs.c | 15 +----
> drivers/acpi/thermal.c | 3 -
> drivers/acpi/video.c | 10 ---
> drivers/platform/x86/asus-laptop.c | 1 -
> drivers/platform/x86/eeepc-laptop.c | 1 -
> drivers/platform/x86/fujitsu-laptop.c | 4 -
> drivers/platform/x86/panasonic-laptop.c | 3 -
> drivers/platform/x86/sony-laptop.c | 4 -
> drivers/platform/x86/thinkpad_acpi.c | 11 ---
> include/acpi/acpi_bus.h | 9 ---
> 21 files changed, 10 insertions(+), 314 deletions(-)
>
> diff --git a/Documentation/laptops/asus-laptop.txt b/Documentation/laptops/asus-laptop.txt
> index 69f9fb3..79a1bc6 100644
> --- a/Documentation/laptops/asus-laptop.txt
> +++ b/Documentation/laptops/asus-laptop.txt
> @@ -8,8 +8,8 @@ http://acpi4asus.sf.net/
>
> This driver provides support for extra features of ACPI-compatible ASUS laptops.
> It may also support some MEDION, JVC or VICTOR laptops (such as MEDION 9675 or
> - VICTOR XP7210 for example). It makes all the extra buttons generate standard
> - ACPI events that go through /proc/acpi/events and input events (like keyboards).
> + VICTOR XP7210 for example). It makes all the extra buttons generate input
> + events (like keyboards).
> On some models adds support for changing the display brightness and output,
> switching the LCD backlight on and off, and most importantly, allows you to
> blink those fancy LEDs intended for reporting mail and wireless status.
> @@ -55,8 +55,8 @@ Usage
> DSDT) to me.
>
> That's all, now, all the events generated by the hotkeys of your laptop
> - should be reported in your /proc/acpi/event entry. You can check with
> - "acpi_listen".
> + should be reported via netlink events. You can check with
> + "acpi_genl monitor" (part of the acpica project).
>
> Hotkeys are also reported as input keys (like keyboards) you can check
> which key are supported using "xev" under X11.
> diff --git a/Documentation/laptops/sony-laptop.txt b/Documentation/laptops/sony-laptop.txt
> index 0d5ac7f..978b1e6 100644
> --- a/Documentation/laptops/sony-laptop.txt
> +++ b/Documentation/laptops/sony-laptop.txt
> @@ -12,10 +12,10 @@ Fn keys (hotkeys):
> ------------------
> Some models report hotkeys through the SNC or SPIC devices, such events are
> reported both through the ACPI subsystem as acpi events and through the INPUT
> -subsystem. See the logs of acpid or /proc/acpi/event and
> -/proc/bus/input/devices to find out what those events are and which input
> -devices are created by the driver. Additionally, loading the driver with the
> -debug option will report all events in the kernel log.
> +subsystem. See the logs of /proc/bus/input/devices to find out what those
> +events are and which input devices are created by the driver.
> +Additionally, loading the driver with the debug option will report all events
> +in the kernel log.
>
> The "scancodes" passed to the input system (that can be remapped with udev)
> are indexes to the table "sony_laptop_input_keycode_map" in the sony-laptop.c
> diff --git a/Documentation/power/video_extension.txt b/Documentation/power/video_extension.txt
> index b2f9b15..25ac682 100644
> --- a/Documentation/power/video_extension.txt
> +++ b/Documentation/power/video_extension.txt
> @@ -20,18 +20,3 @@ VGA/CRT : CRT output
> VGA/LCD : LCD output
> VGA/TVO : TV output
> VGA/*/brightness : Used to get/set brightness of output device
> -
> -Notify event through /proc/acpi/event:
> -
> -#define ACPI_VIDEO_NOTIFY_SWITCH 0x80
> -#define ACPI_VIDEO_NOTIFY_PROBE 0x81
> -#define ACPI_VIDEO_NOTIFY_CYCLE 0x82
> -#define ACPI_VIDEO_NOTIFY_NEXT_OUTPUT 0x83
> -#define ACPI_VIDEO_NOTIFY_PREV_OUTPUT 0x84
> -
> -#define ACPI_VIDEO_NOTIFY_CYCLE_BRIGHTNESS 0x82
> -#define ACPI_VIDEO_NOTIFY_INC_BRIGHTNESS 0x83
> -#define ACPI_VIDEO_NOTIFY_DEC_BRIGHTNESS 0x84
> -#define ACPI_VIDEO_NOTIFY_ZERO_BRIGHTNESS 0x85
> -#define ACPI_VIDEO_NOTIFY_DISPLAY_OFF 0x86
> -
> diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
> index 100bd72..3278a21 100644
> --- a/drivers/acpi/Kconfig
> +++ b/drivers/acpi/Kconfig
> @@ -91,24 +91,6 @@ config ACPI_EC_DEBUGFS
> Thus this option is a debug option that helps to write ACPI drivers
> and can be used to identify ACPI code or EC firmware bugs.
>
> -config ACPI_PROC_EVENT
> - bool "Deprecated /proc/acpi/event support"
> - depends on PROC_FS
> - default y
> - help
> - A user-space daemon, acpid, typically reads /proc/acpi/event
> - and handles all ACPI-generated events.
> -
> - These events are now delivered to user-space either
> - via the input layer or as netlink events.
> -
> - This build option enables the old code for legacy
> - user-space implementation. After some time, this will
> - be moved under CONFIG_ACPI_PROCFS, and then deleted.
> -
> - Say Y here to retain the old behaviour. Say N if your
> - user-space is newer than kernel 2.6.23 (September 2007).
> -
> config ACPI_AC
> tristate "AC Adapter"
> depends on X86
> diff --git a/drivers/acpi/ac.c b/drivers/acpi/ac.c
> index 4f4e741..f37beaa3 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)
> msleep(ac_sleep_before_get_state_ms);
>
> acpi_ac_get_state(ac);
> - acpi_bus_generate_proc_event(device, event, (u32) ac->state);
> acpi_bus_generate_netlink_event(device->pnp.device_class,
> dev_name(&device->dev), event,
> (u32) ac->state);
> diff --git a/drivers/acpi/acpi_pad.c b/drivers/acpi/acpi_pad.c
> index 27bb6a9..6230637 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,
> switch (event) {
> case ACPI_PROCESSOR_AGGREGATOR_NOTIFY:
> acpi_pad_handle_notify(handle);
> - acpi_bus_generate_proc_event(device, event, 0);
> acpi_bus_generate_netlink_event(device->pnp.device_class,
> dev_name(&device->dev), event, 0);
> break;
> diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
> index e710045..5f6b595 100644
> --- a/drivers/acpi/battery.c
> +++ b/drivers/acpi/battery.c
> @@ -1034,8 +1034,6 @@ static void acpi_battery_notify(struct acpi_device *device, u32 event)
> if (event == ACPI_BATTERY_NOTIFY_INFO)
> acpi_battery_refresh(battery);
> acpi_battery_update(battery);
> - acpi_bus_generate_proc_event(device, event,
> - acpi_battery_present(battery));
> acpi_bus_generate_netlink_event(device->pnp.device_class,
> dev_name(&device->dev), event,
> acpi_battery_present(battery));
> diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
> index 292de3c..2a0d8d2 100644
> --- a/drivers/acpi/bus.c
> +++ b/drivers/acpi/bus.c
> @@ -347,104 +347,6 @@ static void acpi_bus_osc_support(void)
> }
>
> /* --------------------------------------------------------------------------
> - Event Management
> - -------------------------------------------------------------------------- */
> -
> -#ifdef CONFIG_ACPI_PROC_EVENT
> -static DEFINE_SPINLOCK(acpi_bus_event_lock);
> -
> -LIST_HEAD(acpi_bus_event_list);
> -DECLARE_WAIT_QUEUE_HEAD(acpi_bus_event_queue);
> -
> -extern int event_is_open;
> -
> -int acpi_bus_generate_proc_event4(const char *device_class, const char *bus_id, u8 type, int data)
> -{
> - struct acpi_bus_event *event;
> - unsigned long flags = 0;
> -
> - /* drop event on the floor if no one's listening */
> - if (!event_is_open)
> - return 0;
> -
> - event = kzalloc(sizeof(struct acpi_bus_event), GFP_ATOMIC);
> - if (!event)
> - return -ENOMEM;
> -
> - strcpy(event->device_class, device_class);
> - strcpy(event->bus_id, bus_id);
> - event->type = type;
> - event->data = data;
> -
> - spin_lock_irqsave(&acpi_bus_event_lock, flags);
> - list_add_tail(&event->node, &acpi_bus_event_list);
> - spin_unlock_irqrestore(&acpi_bus_event_lock, flags);
> -
> - wake_up_interruptible(&acpi_bus_event_queue);
> -
> - return 0;
> -
> -}
> -
> -EXPORT_SYMBOL_GPL(acpi_bus_generate_proc_event4);
> -
> -int acpi_bus_generate_proc_event(struct acpi_device *device, u8 type, int data)
> -{
> - if (!device)
> - return -EINVAL;
> - return acpi_bus_generate_proc_event4(device->pnp.device_class,
> - device->pnp.bus_id, type, data);
> -}
> -
> -EXPORT_SYMBOL(acpi_bus_generate_proc_event);
> -
> -int acpi_bus_receive_event(struct acpi_bus_event *event)
> -{
> - unsigned long flags = 0;
> - struct acpi_bus_event *entry = NULL;
> -
> - DECLARE_WAITQUEUE(wait, current);
> -
> -
> - if (!event)
> - return -EINVAL;
> -
> - if (list_empty(&acpi_bus_event_list)) {
> -
> - set_current_state(TASK_INTERRUPTIBLE);
> - add_wait_queue(&acpi_bus_event_queue, &wait);
> -
> - if (list_empty(&acpi_bus_event_list))
> - schedule();
> -
> - remove_wait_queue(&acpi_bus_event_queue, &wait);
> - set_current_state(TASK_RUNNING);
> -
> - if (signal_pending(current))
> - return -ERESTARTSYS;
> - }
> -
> - spin_lock_irqsave(&acpi_bus_event_lock, flags);
> - if (!list_empty(&acpi_bus_event_list)) {
> - entry = list_entry(acpi_bus_event_list.next,
> - struct acpi_bus_event, node);
> - list_del(&entry->node);
> - }
> - spin_unlock_irqrestore(&acpi_bus_event_lock, flags);
> -
> - if (!entry)
> - return -ENODEV;
> -
> - memcpy(event, entry, sizeof(struct acpi_bus_event));
> -
> - kfree(entry);
> -
> - return 0;
> -}
> -
> -#endif /* CONFIG_ACPI_PROC_EVENT */
> -
> -/* --------------------------------------------------------------------------
> Notification Handling
> -------------------------------------------------------------------------- */
>
> diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c
> index d2e617b..a557738 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)
>
> pm_wakeup_event(&device->dev, 0);
> }
> -
> - acpi_bus_generate_proc_event(device, event, ++button->pushed);
> break;
> default:
> ACPI_DEBUG_PRINT((ACPI_DB_INFO,
> diff --git a/drivers/acpi/event.c b/drivers/acpi/event.c
> index 1442737..8247fcd 100644
> --- a/drivers/acpi/event.c
> +++ b/drivers/acpi/event.c
> @@ -21,100 +21,6 @@
> #define _COMPONENT ACPI_SYSTEM_COMPONENT
> ACPI_MODULE_NAME("event");
>
> -#ifdef CONFIG_ACPI_PROC_EVENT
> -/* Global vars for handling event proc entry */
> -static DEFINE_SPINLOCK(acpi_system_event_lock);
> -int event_is_open = 0;
> -extern struct list_head acpi_bus_event_list;
> -extern wait_queue_head_t acpi_bus_event_queue;
> -
> -static int acpi_system_open_event(struct inode *inode, struct file *file)
> -{
> - spin_lock_irq(&acpi_system_event_lock);
> -
> - if (event_is_open)
> - goto out_busy;
> -
> - event_is_open = 1;
> -
> - spin_unlock_irq(&acpi_system_event_lock);
> - return 0;
> -
> - out_busy:
> - spin_unlock_irq(&acpi_system_event_lock);
> - return -EBUSY;
> -}
> -
> -static ssize_t
> -acpi_system_read_event(struct file *file, char __user * buffer, size_t count,
> - loff_t * ppos)
> -{
> - int result = 0;
> - struct acpi_bus_event event;
> - static char str[ACPI_MAX_STRING];
> - static int chars_remaining = 0;
> - static char *ptr;
> -
> - if (!chars_remaining) {
> - memset(&event, 0, sizeof(struct acpi_bus_event));
> -
> - if ((file->f_flags & O_NONBLOCK)
> - && (list_empty(&acpi_bus_event_list)))
> - return -EAGAIN;
> -
> - result = acpi_bus_receive_event(&event);
> - if (result)
> - return result;
> -
> - chars_remaining = sprintf(str, "%s %s %08x %08x\n",
> - event.device_class ? event.
> - device_class : "<unknown>",
> - event.bus_id ? event.
> - bus_id : "<unknown>", event.type,
> - event.data);
> - ptr = str;
> - }
> -
> - if (chars_remaining < count) {
> - count = chars_remaining;
> - }
> -
> - if (copy_to_user(buffer, ptr, count))
> - return -EFAULT;
> -
> - *ppos += count;
> - chars_remaining -= count;
> - ptr += count;
> -
> - return count;
> -}
> -
> -static int acpi_system_close_event(struct inode *inode, struct file *file)
> -{
> - spin_lock_irq(&acpi_system_event_lock);
> - event_is_open = 0;
> - spin_unlock_irq(&acpi_system_event_lock);
> - return 0;
> -}
> -
> -static unsigned int acpi_system_poll_event(struct file *file, poll_table * wait)
> -{
> - poll_wait(file, &acpi_bus_event_queue, wait);
> - if (!list_empty(&acpi_bus_event_list))
> - return POLLIN | POLLRDNORM;
> - return 0;
> -}
> -
> -static const struct file_operations acpi_system_event_ops = {
> - .owner = THIS_MODULE,
> - .open = acpi_system_open_event,
> - .read = acpi_system_read_event,
> - .release = acpi_system_close_event,
> - .poll = acpi_system_poll_event,
> - .llseek = default_llseek,
> -};
> -#endif /* CONFIG_ACPI_PROC_EVENT */
> -
> /* ACPI notifier chain */
> static BLOCKING_NOTIFIER_HEAD(acpi_chain_head);
>
> @@ -280,9 +186,6 @@ static int acpi_event_genetlink_init(void)
>
> static int __init acpi_event_init(void)
> {
> -#ifdef CONFIG_ACPI_PROC_EVENT
> - struct proc_dir_entry *entry;
> -#endif
> int error = 0;
>
> if (acpi_disabled)
> @@ -293,15 +196,6 @@ static int __init acpi_event_init(void)
> if (error)
> printk(KERN_WARNING PREFIX
> "Failed to create genetlink family for ACPI event\n");
> -
> -#ifdef CONFIG_ACPI_PROC_EVENT
> - /* 'event' [R] */
> - entry = proc_create("event", S_IRUSR, acpi_root_dir,
> - &acpi_system_event_ops);
> - if (!entry)
> - return -ENODEV;
> -#endif
> -
> return 0;
> }
>
> diff --git a/drivers/acpi/processor_driver.c b/drivers/acpi/processor_driver.c
> index c266cdc..c3a727e 100644
> --- a/drivers/acpi/processor_driver.c
> +++ b/drivers/acpi/processor_driver.c
> @@ -393,21 +393,17 @@ static void acpi_processor_notify(struct acpi_device *device, u32 event)
> acpi_processor_ppc_has_changed(pr, 1);
> if (saved == pr->performance_platform_limit)
> break;
> - acpi_bus_generate_proc_event(device, event,
> - pr->performance_platform_limit);
> acpi_bus_generate_netlink_event(device->pnp.device_class,
> dev_name(&device->dev), event,
> pr->performance_platform_limit);
> break;
> case ACPI_PROCESSOR_NOTIFY_POWER:
> acpi_processor_cst_has_changed(pr);
> - acpi_bus_generate_proc_event(device, event, 0);
> acpi_bus_generate_netlink_event(device->pnp.device_class,
> dev_name(&device->dev), event, 0);
> break;
> case ACPI_PROCESSOR_NOTIFY_THROTTLING:
> acpi_processor_tstate_has_changed(pr);
> - acpi_bus_generate_proc_event(device, event, 0);
> acpi_bus_generate_netlink_event(device->pnp.device_class,
> dev_name(&device->dev), event, 0);
> break;
> diff --git a/drivers/acpi/sbs.c b/drivers/acpi/sbs.c
> index b6241ee..aef7e1c 100644
> --- a/drivers/acpi/sbs.c
> +++ b/drivers/acpi/sbs.c
> @@ -873,14 +873,9 @@ static void acpi_sbs_callback(void *context)
> u8 saved_charger_state = sbs->charger_present;
> u8 saved_battery_state;
> acpi_ac_get_present(sbs);
> - if (sbs->charger_present != saved_charger_state) {
> -#ifdef CONFIG_ACPI_PROC_EVENT
> - acpi_bus_generate_proc_event4(ACPI_AC_CLASS, ACPI_AC_DIR_NAME,
> - ACPI_SBS_NOTIFY_STATUS,
> - sbs->charger_present);
> -#endif
> + if (sbs->charger_present != saved_charger_state)
> kobject_uevent(&sbs->charger.dev->kobj, KOBJ_CHANGE);
> - }
> +
> if (sbs->manager_present) {
> for (id = 0; id < MAX_SBS_BAT; ++id) {
> if (!(sbs->batteries_supported & (1 << id)))
> @@ -890,12 +885,6 @@ static void acpi_sbs_callback(void *context)
> acpi_battery_read(bat);
> if (saved_battery_state == bat->present)
> continue;
> -#ifdef CONFIG_ACPI_PROC_EVENT
> - acpi_bus_generate_proc_event4(ACPI_BATTERY_CLASS,
> - bat->name,
> - ACPI_SBS_NOTIFY_STATUS,
> - bat->present);
> -#endif
> kobject_uevent(&bat->bat.dev->kobj, KOBJ_CHANGE);
> }
> }
> diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
> index a33821c..547a906 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,
> else
> return 0;
>
> - acpi_bus_generate_proc_event(tz->device, type, 1);
> acpi_bus_generate_netlink_event(tz->device->pnp.device_class,
> dev_name(&tz->device->dev), type, 1);
>
> @@ -980,14 +979,12 @@ static void acpi_thermal_notify(struct acpi_device *device, u32 event)
> case ACPI_THERMAL_NOTIFY_THRESHOLDS:
> acpi_thermal_trips_update(tz, ACPI_TRIPS_REFRESH_THRESHOLDS);
> acpi_thermal_check(tz);
> - acpi_bus_generate_proc_event(device, event, 0);
> acpi_bus_generate_netlink_event(device->pnp.device_class,
> dev_name(&device->dev), event, 0);
> break;
> case ACPI_THERMAL_NOTIFY_DEVICES:
> acpi_thermal_trips_update(tz, ACPI_TRIPS_REFRESH_DEVICES);
> acpi_thermal_check(tz);
> - acpi_bus_generate_proc_event(device, event, 0);
> acpi_bus_generate_netlink_event(device->pnp.device_class,
> dev_name(&device->dev), event, 0);
> break;
> diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
> index 440eadf..8910fdf 100644
> --- a/drivers/acpi/video.c
> +++ b/drivers/acpi/video.c
> @@ -1556,7 +1556,6 @@ static void acpi_video_bus_notify(struct acpi_device *device, u32 event)
> switch (event) {
> case ACPI_VIDEO_NOTIFY_SWITCH: /* User requested a switch,
> * most likely via hotkey. */
> - acpi_bus_generate_proc_event(device, event, 0);
> keycode = KEY_SWITCHVIDEOMODE;
> break;
>
> @@ -1564,20 +1563,16 @@ static void acpi_video_bus_notify(struct acpi_device *device, u32 event)
> * connector. */
> acpi_video_device_enumerate(video);
> acpi_video_device_rebind(video);
> - acpi_bus_generate_proc_event(device, event, 0);
> keycode = KEY_SWITCHVIDEOMODE;
> break;
>
> case ACPI_VIDEO_NOTIFY_CYCLE: /* Cycle Display output hotkey pressed. */
> - acpi_bus_generate_proc_event(device, event, 0);
> keycode = KEY_SWITCHVIDEOMODE;
> break;
> case ACPI_VIDEO_NOTIFY_NEXT_OUTPUT: /* Next Display output hotkey pressed. */
> - acpi_bus_generate_proc_event(device, event, 0);
> keycode = KEY_VIDEO_NEXT;
> break;
> case ACPI_VIDEO_NOTIFY_PREV_OUTPUT: /* previous Display output hotkey pressed. */
> - acpi_bus_generate_proc_event(device, event, 0);
> keycode = KEY_VIDEO_PREV;
> break;
>
> @@ -1620,31 +1615,26 @@ static void acpi_video_device_notify(acpi_handle handle, u32 event, void *data)
> case ACPI_VIDEO_NOTIFY_CYCLE_BRIGHTNESS: /* Cycle brightness */
> if (brightness_switch_enabled)
> acpi_video_switch_brightness(video_device, event);
> - acpi_bus_generate_proc_event(device, event, 0);
> keycode = KEY_BRIGHTNESS_CYCLE;
> break;
> case ACPI_VIDEO_NOTIFY_INC_BRIGHTNESS: /* Increase brightness */
> if (brightness_switch_enabled)
> acpi_video_switch_brightness(video_device, event);
> - acpi_bus_generate_proc_event(device, event, 0);
> keycode = KEY_BRIGHTNESSUP;
> break;
> case ACPI_VIDEO_NOTIFY_DEC_BRIGHTNESS: /* Decrease brightness */
> if (brightness_switch_enabled)
> acpi_video_switch_brightness(video_device, event);
> - acpi_bus_generate_proc_event(device, event, 0);
> keycode = KEY_BRIGHTNESSDOWN;
> break;
> case ACPI_VIDEO_NOTIFY_ZERO_BRIGHTNESS: /* zero brightness */
> if (brightness_switch_enabled)
> acpi_video_switch_brightness(video_device, event);
> - acpi_bus_generate_proc_event(device, event, 0);
> keycode = KEY_BRIGHTNESS_ZERO;
> break;
> case ACPI_VIDEO_NOTIFY_DISPLAY_OFF: /* display device off */
> if (brightness_switch_enabled)
> acpi_video_switch_brightness(video_device, event);
> - acpi_bus_generate_proc_event(device, event, 0);
> keycode = KEY_DISPLAY_OFF;
> break;
> default:
> diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/asus-laptop.c
> index 0eea09c..9d1d1c2 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)
>
> /* TODO Find a better way to handle events count. */
> count = asus->event_count[event % 128]++;
> - acpi_bus_generate_proc_event(asus->device, event, count);
> acpi_bus_generate_netlink_event(asus->device->pnp.device_class,
> dev_name(&asus->device->dev), event,
> count);
> diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c
> index 5d26e70..a6afd41 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)
> if (event > ACPI_MAX_SYS_NOTIFY)
> return;
> count = eeepc->event_count[event % 128]++;
> - acpi_bus_generate_proc_event(device, event, count);
> acpi_bus_generate_netlink_event(device->pnp.device_class,
> dev_name(&device->dev), event,
> count);
> diff --git a/drivers/platform/x86/fujitsu-laptop.c b/drivers/platform/x86/fujitsu-laptop.c
> index 1c9386e..52b8a97 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)
> else
> set_lcd_level(newb);
> }
> - acpi_bus_generate_proc_event(fujitsu->dev,
> - ACPI_VIDEO_NOTIFY_INC_BRIGHTNESS, 0);
> keycode = KEY_BRIGHTNESSUP;
> } else if (oldb > newb) {
> if (disable_brightness_adjust != 1) {
> @@ -783,8 +781,6 @@ static void acpi_fujitsu_notify(struct acpi_device *device, u32 event)
> else
> set_lcd_level(newb);
> }
> - acpi_bus_generate_proc_event(fujitsu->dev,
> - ACPI_VIDEO_NOTIFY_DEC_BRIGHTNESS, 0);
> keycode = KEY_BRIGHTNESSDOWN;
> }
> break;
> diff --git a/drivers/platform/x86/panasonic-laptop.c b/drivers/platform/x86/panasonic-laptop.c
> index 4add9a3..984253d 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)
> "error getting hotkey status\n"));
> return;
> }
> -
> - acpi_bus_generate_proc_event(pcc->device, HKEY_NOTIFY, result);
> -
> if (!sparse_keymap_report_event(hotk_input_dev,
> result & 0xf, result & 0x80, false))
> ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
> diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c
> index 2ac045f..069821b 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)
> ev_type = HOTKEY;
> sony_laptop_report_input_event(real_ev);
> }
> -
> - acpi_bus_generate_proc_event(sony_nc_acpi_device, ev_type, real_ev);
> -
> acpi_bus_generate_netlink_event(sony_nc_acpi_device->pnp.device_class,
> dev_name(&sony_nc_acpi_device->dev), ev_type, real_ev);
> }
> @@ -4243,7 +4240,6 @@ static irqreturn_t sony_pic_irq(int irq, void *dev_id)
>
> found:
> sony_laptop_report_input_event(device_event);
> - acpi_bus_generate_proc_event(dev->acpi_dev, 1, device_event);
> sonypi_compat_report_event(device_event);
> return IRQ_HANDLED;
> }
> diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
> index 54d31c0..e946c0d 100644
> --- a/drivers/platform/x86/thinkpad_acpi.c
> +++ b/drivers/platform/x86/thinkpad_acpi.c
> @@ -2282,10 +2282,6 @@ static struct tp_acpi_drv_struct ibm_hotkey_acpidriver;
> static void tpacpi_hotkey_send_key(unsigned int scancode)
> {
> tpacpi_input_send_key_masked(scancode);
> - if (hotkey_report_mode < 2) {
> - acpi_bus_generate_proc_event(ibm_hotkey_acpidriver.device,
> - 0x80, TP_HKEY_EV_HOTKEY_BASE + scancode);
> - }
> }
>
> static void hotkey_read_nvram(struct tp_nvram_state *n, const u32 m)
> @@ -3737,13 +3733,6 @@ static void hotkey_notify(struct ibm_struct *ibm, u32 event)
> "event happened to %s\n", TPACPI_MAIL);
> }
>
> - /* Legacy events */
> - if (!ignore_acpi_ev &&
> - (send_acpi_ev || hotkey_report_mode < 2)) {
> - acpi_bus_generate_proc_event(ibm->acpi->device,
> - event, hkey);
> - }
> -
> /* netlink events */
> if (!ignore_acpi_ev && send_acpi_ev) {
> acpi_bus_generate_netlink_event(
> diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
> index c13c919..09ce5b3 100644
> --- a/include/acpi/acpi_bus.h
> +++ b/include/acpi/acpi_bus.h
> @@ -392,15 +392,6 @@ bool acpi_bus_can_wakeup(acpi_handle handle);
> static inline bool acpi_bus_can_wakeup(acpi_handle handle) { return false; }
> #endif
>
> -#ifdef CONFIG_ACPI_PROC_EVENT
> -int acpi_bus_generate_proc_event(struct acpi_device *device, u8 type, int data);
> -int acpi_bus_generate_proc_event4(const char *class, const char *bid, u8 type, int data);
> -int acpi_bus_receive_event(struct acpi_bus_event *event);
> -#else
> -static inline int acpi_bus_generate_proc_event(struct acpi_device *device, u8 type, int data)
> - { return 0; }
> -#endif
> -
> void acpi_scan_lock_acquire(void);
> void acpi_scan_lock_release(void);
> int acpi_scan_add_handler(struct acpi_scan_handler *handler);
>
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

2013-07-04 07:49:13

by Thomas Renninger

[permalink] [raw]
Subject: Re: [PATCH 2/3] ACPI: Remove old /proc/acpi/event interface

On Wednesday, July 03, 2013 11:56:27 PM Rafael J. Wysocki wrote:
> On Wednesday, July 03, 2013 02:48:38 PM Thomas Renninger wrote:
> > It is quite some time that this one is deprecated.
> > Get rid of it.
> >
> > If there should really some important user be overseen it could get
> > reverted and worked on the userspace program first. But it is time to do
> > something to get rid of this old stuff...
>
> Does this patch depend on the other patches in this series?

I should have split this up in two submit requests...:

[PATCH 1/3] x86 microcode: Remove old MICROCODE_OLD_INTERFACE
is independent from the other two, but

[PATCH 2/3] ACPI: Remove old /proc/acpi/event interface
and
[PATCH 3/3] platform thinkpad: Remove deprecated hotkey_report_mode parameter
should go in together.

Thomas

2013-07-04 12:28:14

by Rafael J. Wysocki

[permalink] [raw]
Subject: Re: [PATCH 2/3] ACPI: Remove old /proc/acpi/event interface

On Thursday, July 04, 2013 09:49:02 AM Thomas Renninger wrote:
> On Wednesday, July 03, 2013 11:56:27 PM Rafael J. Wysocki wrote:
> > On Wednesday, July 03, 2013 02:48:38 PM Thomas Renninger wrote:
> > > It is quite some time that this one is deprecated.
> > > Get rid of it.
> > >
> > > If there should really some important user be overseen it could get
> > > reverted and worked on the userspace program first. But it is time to do
> > > something to get rid of this old stuff...
> >
> > Does this patch depend on the other patches in this series?
>
> I should have split this up in two submit requests...:
>
> [PATCH 1/3] x86 microcode: Remove old MICROCODE_OLD_INTERFACE
> is independent from the other two, but
>
> [PATCH 2/3] ACPI: Remove old /proc/acpi/event interface
> and
> [PATCH 3/3] platform thinkpad: Remove deprecated hotkey_report_mode parameter
> should go in together.

OK

I can take [2/3] and [3/3] for 3.12 if Matthew has no objections. Matthew?

Rafael


--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

2013-07-04 13:53:21

by Matthew Garrett

[permalink] [raw]
Subject: Re: [PATCH 2/3] ACPI: Remove old /proc/acpi/event interface

On Thu, 2013-07-04 at 14:37 +0200, Rafael J. Wysocki wrote:

> I can take [2/3] and [3/3] for 3.12 if Matthew has no objections. Matthew?

ACK.

--
Matthew Garrett | [email protected]
????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?

Subject: Re: [PATCH 3/3] platform thinkpad: Remove deprecated hotkey_report_mode parameter

On Wed, 03 Jul 2013, Thomas Renninger wrote:
> It is somewhat strange that the default value to support the depracated
> interface is set (1).
> Anyway this exists for years. The previous patch already removed the
> functionality to still export specific events through /proc. Now this param
> is useless and should vanish as well.
>
> CC: Henrique de Moraes Holschuh <[email protected]>
> Signed-off-by: Thomas Renninger <[email protected]>

Acked-by: Henrique de Moraes Holschuh <[email protected]>

--
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot
Henrique Holschuh

Subject: Re: [PATCH 2/3] ACPI: Remove old /proc/acpi/event interface

On Wed, 03 Jul 2013, Thomas Renninger wrote:
> It is quite some time that this one is deprecated.
> Get rid of it.
>
> If there should really some important user be overseen it could get reverted
> and worked on the userspace program first. But it is time to do something to
> get rid of this old stuff...
>
> CC: [email protected]
> CC: [email protected]
> CC: Rafael J. Wysocki <[email protected]>
> CC: Matthew Garrett <[email protected]>
> CC: Henrique de Moraes Holschuh <[email protected]>

For the thinkpad-acpi hunks:
Acked-by: Henrique de Moraes Holschuh <[email protected]>

> Signed-off-by: Thomas Renninger <[email protected]>
> ---
> Documentation/laptops/asus-laptop.txt | 8 +-
> Documentation/laptops/sony-laptop.txt | 8 +-
> Documentation/power/video_extension.txt | 15 -----
> drivers/acpi/Kconfig | 18 -----
> drivers/acpi/ac.c | 1 -
> drivers/acpi/acpi_pad.c | 1 -
> drivers/acpi/battery.c | 2 -
> drivers/acpi/bus.c | 98 ----------------------------
> drivers/acpi/button.c | 2 -
> drivers/acpi/event.c | 106 -------------------------------
> drivers/acpi/processor_driver.c | 4 -
> drivers/acpi/sbs.c | 15 +----
> drivers/acpi/thermal.c | 3 -
> drivers/acpi/video.c | 10 ---
> drivers/platform/x86/asus-laptop.c | 1 -
> drivers/platform/x86/eeepc-laptop.c | 1 -
> drivers/platform/x86/fujitsu-laptop.c | 4 -
> drivers/platform/x86/panasonic-laptop.c | 3 -
> drivers/platform/x86/sony-laptop.c | 4 -
> drivers/platform/x86/thinkpad_acpi.c | 11 ---
> include/acpi/acpi_bus.h | 9 ---
> 21 files changed, 10 insertions(+), 314 deletions(-)

--
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot
Henrique Holschuh