diff options
| author | Len Brown <len.brown@intel.com> | 2007-08-23 15:20:26 -0400 |
|---|---|---|
| committer | Len Brown <len.brown@intel.com> | 2007-08-23 15:20:26 -0400 |
| commit | 14e04fb34ffa82ee61ae69f98d8fca12d2e8e31c (patch) | |
| tree | 51ff919052cf456a23fa67e8d64d18f376b90582 | |
| parent | 962ce8ca0604af0c3c5609f7613d4ec5fcfac623 (diff) | |
ACPI: Schedule /proc/acpi/event for removal
Schedule /proc/acpi/event for removal in 6 months.
Re-name acpi_bus_generate_event() to acpi_bus_generate_proc_event()
to make sure there is no confusion that it is for /proc/acpi/event only.
Add CONFIG_ACPI_PROC_EVENT to allow removal of /proc/acpi/event.
There is no functional change if CONFIG_ACPI_PROC_EVENT=y
Signed-off-by: Len Brown <len.brown@intel.com>
| -rw-r--r-- | Documentation/feature-removal-schedule.txt | 8 | ||||
| -rw-r--r-- | drivers/acpi/Kconfig | 14 | ||||
| -rw-r--r-- | drivers/acpi/ac.c | 2 | ||||
| -rw-r--r-- | drivers/acpi/asus_acpi.c | 2 | ||||
| -rw-r--r-- | drivers/acpi/battery.c | 2 | ||||
| -rw-r--r-- | drivers/acpi/bus.c | 6 | ||||
| -rw-r--r-- | drivers/acpi/button.c | 2 | ||||
| -rw-r--r-- | drivers/acpi/event.c | 6 | ||||
| -rw-r--r-- | drivers/acpi/processor_core.c | 6 | ||||
| -rw-r--r-- | drivers/acpi/sbs.c | 2 | ||||
| -rw-r--r-- | drivers/acpi/thermal.c | 8 | ||||
| -rw-r--r-- | drivers/acpi/video.c | 10 | ||||
| -rw-r--r-- | drivers/char/sonypi.c | 2 | ||||
| -rw-r--r-- | drivers/misc/asus-laptop.c | 2 | ||||
| -rw-r--r-- | drivers/misc/sony-laptop.c | 4 | ||||
| -rw-r--r-- | drivers/misc/thinkpad_acpi.c | 8 | ||||
| -rw-r--r-- | drivers/pci/hotplug/acpiphp_ibm.c | 2 | ||||
| -rw-r--r-- | include/acpi/acpi_bus.h | 7 |
18 files changed, 64 insertions, 29 deletions
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt index a43d2878a4ef..b9a3fdc1cc5a 100644 --- a/Documentation/feature-removal-schedule.txt +++ b/Documentation/feature-removal-schedule.txt | |||
| @@ -197,6 +197,14 @@ Who: Len Brown <len.brown@intel.com> | |||
| 197 | 197 | ||
| 198 | --------------------------- | 198 | --------------------------- |
| 199 | 199 | ||
| 200 | What: /proc/acpi/event | ||
| 201 | When: February 2008 | ||
| 202 | Why: /proc/acpi/event has been replaced by events via the input layer | ||
| 203 | and netlink since 2.6.23. | ||
| 204 | Who: Len Brown <len.brown@intel.com> | ||
| 205 | |||
| 206 | --------------------------- | ||
| 207 | |||
| 200 | What: Compaq touchscreen device emulation | 208 | What: Compaq touchscreen device emulation |
| 201 | When: Oct 2007 | 209 | When: Oct 2007 |
| 202 | Files: drivers/input/tsdev.c | 210 | Files: drivers/input/tsdev.c |
diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig index f1372de4ce79..574259476fbf 100644 --- a/drivers/acpi/Kconfig +++ b/drivers/acpi/Kconfig | |||
| @@ -68,6 +68,20 @@ config ACPI_PROCFS | |||
| 68 | 68 | ||
| 69 | Say N to delete /proc/acpi/ files that have moved to /sys/ | 69 | Say N to delete /proc/acpi/ files that have moved to /sys/ |
| 70 | 70 | ||
| 71 | config ACPI_PROC_EVENT | ||
| 72 | bool "Deprecated /proc/acpi/event support" | ||
| 73 | depends on PROC_FS | ||
| 74 | ---help--- | ||
| 75 | A user-space daemon, acpi, typically read /proc/acpi/event | ||
| 76 | and handled all ACPI sub-system generated events. | ||
| 77 | |||
| 78 | These events are now delivered to user-space via | ||
| 79 | either the input layer, or as netlink events. | ||
| 80 | |||
| 81 | This build option enables the old code for for legacy | ||
| 82 | user-space implementation. After some time, this will | ||
| 83 | be moved under CONFIG_ACPI_PROCFS, and then deleted. | ||
| 84 | |||
| 71 | config ACPI_AC | 85 | config ACPI_AC |
| 72 | tristate "AC Adapter" | 86 | tristate "AC Adapter" |
| 73 | depends on X86 | 87 | depends on X86 |
diff --git a/drivers/acpi/ac.c b/drivers/acpi/ac.c index b53c2cfcafd3..26d70702b313 100644 --- a/drivers/acpi/ac.c +++ b/drivers/acpi/ac.c | |||
| @@ -204,7 +204,7 @@ static void acpi_ac_notify(acpi_handle handle, u32 event, void *data) | |||
| 204 | case ACPI_NOTIFY_BUS_CHECK: | 204 | case ACPI_NOTIFY_BUS_CHECK: |
| 205 | case ACPI_NOTIFY_DEVICE_CHECK: | 205 | case ACPI_NOTIFY_DEVICE_CHECK: |
| 206 | acpi_ac_get_state(ac); | 206 | acpi_ac_get_state(ac); |
| 207 | acpi_bus_generate_event(device, event, (u32) ac->state); | 207 | acpi_bus_generate_proc_event(device, event, (u32) ac->state); |
| 208 | acpi_bus_generate_netlink_event(device->pnp.device_class, | 208 | acpi_bus_generate_netlink_event(device->pnp.device_class, |
| 209 | device->dev.bus_id, event, | 209 | device->dev.bus_id, event, |
| 210 | (u32) ac->state); | 210 | (u32) ac->state); |
diff --git a/drivers/acpi/asus_acpi.c b/drivers/acpi/asus_acpi.c index 86fd142f4bf3..d915fec9bf63 100644 --- a/drivers/acpi/asus_acpi.c +++ b/drivers/acpi/asus_acpi.c | |||
| @@ -1069,7 +1069,7 @@ static void asus_hotk_notify(acpi_handle handle, u32 event, void *data) | |||
| 1069 | hotk->brightness = (event & ~((u32) BR_DOWN)); | 1069 | hotk->brightness = (event & ~((u32) BR_DOWN)); |
| 1070 | } | 1070 | } |
| 1071 | 1071 | ||
| 1072 | acpi_bus_generate_event(hotk->device, event, | 1072 | acpi_bus_generate_proc_event(hotk->device, event, |
| 1073 | hotk->event_count[event % 128]++); | 1073 | hotk->event_count[event % 128]++); |
| 1074 | 1074 | ||
| 1075 | return; | 1075 | return; |
diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c index 9f0bf90afdab..91dc4b316a08 100644 --- a/drivers/acpi/battery.c +++ b/drivers/acpi/battery.c | |||
| @@ -867,7 +867,7 @@ static void acpi_battery_notify(acpi_handle handle, u32 event, void *data) | |||
| 867 | case ACPI_NOTIFY_DEVICE_CHECK: | 867 | case ACPI_NOTIFY_DEVICE_CHECK: |
| 868 | device = battery->device; | 868 | device = battery->device; |
| 869 | acpi_battery_notify_update(battery); | 869 | acpi_battery_notify_update(battery); |
| 870 | acpi_bus_generate_event(device, event, | 870 | acpi_bus_generate_proc_event(device, event, |
| 871 | acpi_battery_present(battery)); | 871 | acpi_battery_present(battery)); |
| 872 | acpi_bus_generate_netlink_event(device->pnp.device_class, | 872 | acpi_bus_generate_netlink_event(device->pnp.device_class, |
| 873 | device->dev.bus_id, event, | 873 | device->dev.bus_id, event, |
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index e5084ececb6f..9ba778a2b484 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c | |||
| @@ -276,6 +276,7 @@ EXPORT_SYMBOL(acpi_bus_set_power); | |||
| 276 | Event Management | 276 | Event Management |
| 277 | -------------------------------------------------------------------------- */ | 277 | -------------------------------------------------------------------------- */ |
| 278 | 278 | ||
| 279 | #ifdef CONFIG_ACPI_PROC_EVENT | ||
| 279 | static DEFINE_SPINLOCK(acpi_bus_event_lock); | 280 | static DEFINE_SPINLOCK(acpi_bus_event_lock); |
| 280 | 281 | ||
| 281 | LIST_HEAD(acpi_bus_event_list); | 282 | LIST_HEAD(acpi_bus_event_list); |
| @@ -283,7 +284,7 @@ DECLARE_WAIT_QUEUE_HEAD(acpi_bus_event_queue); | |||
| 283 | 284 | ||
| 284 | extern int event_is_open; | 285 | extern int event_is_open; |
| 285 | 286 | ||
| 286 | int acpi_bus_generate_event(struct acpi_device *device, u8 type, int data) | 287 | int acpi_bus_generate_proc_event(struct acpi_device *device, u8 type, int data) |
| 287 | { | 288 | { |
| 288 | struct acpi_bus_event *event = NULL; | 289 | struct acpi_bus_event *event = NULL; |
| 289 | unsigned long flags = 0; | 290 | unsigned long flags = 0; |
| @@ -314,7 +315,7 @@ int acpi_bus_generate_event(struct acpi_device *device, u8 type, int data) | |||
| 314 | return 0; | 315 | return 0; |
| 315 | } | 316 | } |
| 316 | 317 | ||
| 317 | EXPORT_SYMBOL(acpi_bus_generate_event); | 318 | EXPORT_SYMBOL(acpi_bus_generate_proc_event); |
| 318 | 319 | ||
| 319 | int acpi_bus_receive_event(struct acpi_bus_event *event) | 320 | int acpi_bus_receive_event(struct acpi_bus_event *event) |
| 320 | { | 321 | { |
| @@ -360,6 +361,7 @@ int acpi_bus_receive_event(struct acpi_bus_event *event) | |||
| 360 | } | 361 | } |
| 361 | 362 | ||
| 362 | EXPORT_SYMBOL(acpi_bus_receive_event); | 363 | EXPORT_SYMBOL(acpi_bus_receive_event); |
| 364 | #endif /* CONFIG_ACPI_PROC_EVENT */ | ||
| 363 | 365 | ||
| 364 | /* -------------------------------------------------------------------------- | 366 | /* -------------------------------------------------------------------------- |
| 365 | Notification Handling | 367 | Notification Handling |
diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c index 540581338ef5..2e79a3395ecf 100644 --- a/drivers/acpi/button.c +++ b/drivers/acpi/button.c | |||
| @@ -284,7 +284,7 @@ static void acpi_button_notify(acpi_handle handle, u32 event, void *data) | |||
| 284 | } | 284 | } |
| 285 | input_sync(input); | 285 | input_sync(input); |
| 286 | 286 | ||
| 287 | acpi_bus_generate_event(button->device, event, | 287 | acpi_bus_generate_proc_event(button->device, event, |
| 288 | ++button->pushed); | 288 | ++button->pushed); |
| 289 | break; | 289 | break; |
| 290 | default: | 290 | default: |
diff --git a/drivers/acpi/event.c b/drivers/acpi/event.c index b7b143288c22..cf6d5161cf31 100644 --- a/drivers/acpi/event.c +++ b/drivers/acpi/event.c | |||
| @@ -17,6 +17,7 @@ | |||
| 17 | #define _COMPONENT ACPI_SYSTEM_COMPONENT | 17 | #define _COMPONENT ACPI_SYSTEM_COMPONENT |
| 18 | ACPI_MODULE_NAME("event"); | 18 | ACPI_MODULE_NAME("event"); |
| 19 | 19 | ||
| 20 | #ifdef CONFIG_ACPI_PROC_EVENT | ||
| 20 | /* Global vars for handling event proc entry */ | 21 | /* Global vars for handling event proc entry */ |
| 21 | static DEFINE_SPINLOCK(acpi_system_event_lock); | 22 | static DEFINE_SPINLOCK(acpi_system_event_lock); |
| 22 | int event_is_open = 0; | 23 | int event_is_open = 0; |
| @@ -106,6 +107,7 @@ static const struct file_operations acpi_system_event_ops = { | |||
| 106 | .release = acpi_system_close_event, | 107 | .release = acpi_system_close_event, |
| 107 | .poll = acpi_system_poll_event, | 108 | .poll = acpi_system_poll_event, |
| 108 | }; | 109 | }; |
| 110 | #endif /* CONFIG_ACPI_PROC_EVENT */ | ||
| 109 | 111 | ||
| 110 | #ifdef CONFIG_NET | 112 | #ifdef CONFIG_NET |
| 111 | static unsigned int acpi_event_seqnum; | 113 | static unsigned int acpi_event_seqnum; |
| @@ -247,7 +249,9 @@ static int acpi_event_genetlink_init(void) | |||
| 247 | 249 | ||
| 248 | static int __init acpi_event_init(void) | ||
