]> err.no Git - linux-2.6/commitdiff
ACPI: Schedule /proc/acpi/event for removal
authorLen Brown <len.brown@intel.com>
Thu, 23 Aug 2007 19:20:26 +0000 (15:20 -0400)
committerLen Brown <len.brown@intel.com>
Thu, 23 Aug 2007 19:20:26 +0000 (15:20 -0400)
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>
18 files changed:
Documentation/feature-removal-schedule.txt
drivers/acpi/Kconfig
drivers/acpi/ac.c
drivers/acpi/asus_acpi.c
drivers/acpi/battery.c
drivers/acpi/bus.c
drivers/acpi/button.c
drivers/acpi/event.c
drivers/acpi/processor_core.c
drivers/acpi/sbs.c
drivers/acpi/thermal.c
drivers/acpi/video.c
drivers/char/sonypi.c
drivers/misc/asus-laptop.c
drivers/misc/sony-laptop.c
drivers/misc/thinkpad_acpi.c
drivers/pci/hotplug/acpiphp_ibm.c
include/acpi/acpi_bus.h

index a43d2878a4efd7a7d0fbe8d50d324c3fcaf75416..b9a3fdc1cc5a570269ff399790d22f0dedc7828f 100644 (file)
@@ -197,6 +197,14 @@ Who:       Len Brown <len.brown@intel.com>
 
 ---------------------------
 
+What:  /proc/acpi/event
+When:  February 2008
+Why:   /proc/acpi/event has been replaced by events via the input layer
+       and netlink since 2.6.23.
+Who:   Len Brown <len.brown@intel.com>
+
+---------------------------
+
 What:  Compaq touchscreen device emulation
 When:  Oct 2007
 Files: drivers/input/tsdev.c
index f1372de4ce7904d06577df91f24a5be725bb852e..574259476fbf82263e9f72efe77562ce2d232cd6 100644 (file)
@@ -68,6 +68,20 @@ config ACPI_PROCFS
 
          Say N to delete /proc/acpi/ files that have moved to /sys/
 
+config ACPI_PROC_EVENT
+       bool "Deprecated /proc/acpi/event support"
+       depends on PROC_FS
+       ---help---
+         A user-space daemon, acpi, typically read /proc/acpi/event
+         and handled all ACPI sub-system generated events.
+
+         These events are now delivered to user-space via
+         either the input layer, or as netlink events.
+
+         This build option enables the old code for for legacy
+         user-space implementation.  After some time, this will
+         be moved under CONFIG_ACPI_PROCFS, and then deleted.
+
 config ACPI_AC
        tristate "AC Adapter"
        depends on X86
index b53c2cfcafd30c954879bae741173013aaaa4785..26d70702b3134124fc4e10111499c7fc990436c6 100644 (file)
@@ -204,7 +204,7 @@ static void acpi_ac_notify(acpi_handle handle, u32 event, void *data)
        case ACPI_NOTIFY_BUS_CHECK:
        case ACPI_NOTIFY_DEVICE_CHECK:
                acpi_ac_get_state(ac);
-               acpi_bus_generate_event(device, event, (u32) ac->state);
+               acpi_bus_generate_proc_event(device, event, (u32) ac->state);
                acpi_bus_generate_netlink_event(device->pnp.device_class,
                                                  device->dev.bus_id, event,
                                                  (u32) ac->state);
index 86fd142f4bf3929731a7b43ef3dc1d1d825f696d..d915fec9bf63e8c1f085dff9ea18f36f1b7ce20d 100644 (file)
@@ -1069,7 +1069,7 @@ static void asus_hotk_notify(acpi_handle handle, u32 event, void *data)
                hotk->brightness = (event & ~((u32) BR_DOWN));
        }
 
-       acpi_bus_generate_event(hotk->device, event,
+       acpi_bus_generate_proc_event(hotk->device, event,
                                hotk->event_count[event % 128]++);
 
        return;
index 9f0bf90afdab31a246ffd5d734ad70435123b899..91dc4b316a084faf59c87ec63322b749349e64c0 100644 (file)
@@ -867,7 +867,7 @@ static void acpi_battery_notify(acpi_handle handle, u32 event, void *data)
        case ACPI_NOTIFY_DEVICE_CHECK:
                device = battery->device;
                acpi_battery_notify_update(battery);
-               acpi_bus_generate_event(device, event,
+               acpi_bus_generate_proc_event(device, event,
                                        acpi_battery_present(battery));
                acpi_bus_generate_netlink_event(device->pnp.device_class,
                                                  device->dev.bus_id, event,
index e5084ececb6ff7f004326a3fcdf24828c45e2f0a..9ba778a2b484ee1601f53ebd6ccd8278741784f0 100644 (file)
@@ -276,6 +276,7 @@ EXPORT_SYMBOL(acpi_bus_set_power);
                                 Event Management
    -------------------------------------------------------------------------- */
 
+#ifdef CONFIG_ACPI_PROC_EVENT
 static DEFINE_SPINLOCK(acpi_bus_event_lock);
 
 LIST_HEAD(acpi_bus_event_list);
@@ -283,7 +284,7 @@ DECLARE_WAIT_QUEUE_HEAD(acpi_bus_event_queue);
 
 extern int event_is_open;
 
-int acpi_bus_generate_event(struct acpi_device *device, u8 type, int data)
+int acpi_bus_generate_proc_event(struct acpi_device *device, u8 type, int data)
 {
        struct acpi_bus_event *event = NULL;
        unsigned long flags = 0;
@@ -314,7 +315,7 @@ int acpi_bus_generate_event(struct acpi_device *device, u8 type, int data)
        return 0;
 }
 
-EXPORT_SYMBOL(acpi_bus_generate_event);
+EXPORT_SYMBOL(acpi_bus_generate_proc_event);
 
 int acpi_bus_receive_event(struct acpi_bus_event *event)
 {
@@ -360,6 +361,7 @@ int acpi_bus_receive_event(struct acpi_bus_event *event)
 }
 
 EXPORT_SYMBOL(acpi_bus_receive_event);
+#endif /* CONFIG_ACPI_PROC_EVENT */
 
 /* --------------------------------------------------------------------------
                              Notification Handling
index 540581338ef5fbd2dcc6d480652d2b63551af1cb..2e79a3395ecffca8641cc02e64b616ef88be5ba6 100644 (file)
@@ -284,7 +284,7 @@ static void acpi_button_notify(acpi_handle handle, u32 event, void *data)
                }
                input_sync(input);
 
-               acpi_bus_generate_event(button->device, event,
+               acpi_bus_generate_proc_event(button->device, event,
                                        ++button->pushed);
                break;
        default:
index b7b143288c229bf5627ac3f8a3752d2d77394573..cf6d5161cf3197d7ddfdf8e4f673fc5e4c063ba7 100644 (file)
@@ -17,6 +17,7 @@
 #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;
@@ -106,6 +107,7 @@ static const struct file_operations acpi_system_event_ops = {
        .release = acpi_system_close_event,
        .poll = acpi_system_poll_event,
 };
+#endif /* CONFIG_ACPI_PROC_EVENT */
 
 #ifdef CONFIG_NET
 static unsigned int acpi_event_seqnum;
@@ -247,7 +249,9 @@ 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)
@@ -259,12 +263,14 @@ static int __init acpi_event_init(void)
                printk(KERN_WARNING PREFIX
                       "Failed to create genetlink family for ACPI event\n");
 
+#ifdef CONFIG_ACPI_PROC_EVENT
        /* 'event' [R] */
        entry = create_proc_entry("event", S_IRUSR, acpi_root_dir);
        if (entry)
                entry->proc_fops = &acpi_system_event_ops;
        else
                return -ENODEV;
+#endif
 
        return 0;
 }
index dbc2e5d9d6a73fbd32003b7637878374c7b878a3..e944aaee4e064e30aa7a65e2a9249a681f463f0a 100644 (file)
@@ -698,7 +698,7 @@ static void acpi_processor_notify(acpi_handle handle, u32 event, void *data)
        switch (event) {
        case ACPI_PROCESSOR_NOTIFY_PERFORMANCE:
                acpi_processor_ppc_has_changed(pr);
-               acpi_bus_generate_event(device, event,
+               acpi_bus_generate_proc_event(device, event,
                                        pr->performance_platform_limit);
                acpi_bus_generate_netlink_event(device->pnp.device_class,
                                                  device->dev.bus_id, event,
@@ -706,13 +706,13 @@ static void acpi_processor_notify(acpi_handle handle, u32 event, void *data)
                break;
        case ACPI_PROCESSOR_NOTIFY_POWER:
                acpi_processor_cst_has_changed(pr);
-               acpi_bus_generate_event(device, event, 0);
+               acpi_bus_generate_proc_event(device, event, 0);
                acpi_bus_generate_netlink_event(device->pnp.device_class,
                                                  device->dev.bus_id, event, 0);
                break;
        case ACPI_PROCESSOR_NOTIFY_THROTTLING:
                acpi_processor_tstate_has_changed(pr);
-               acpi_bus_generate_event(device, event, 0);
+               acpi_bus_generate_proc_event(device, event, 0);
                acpi_bus_generate_netlink_event(device->pnp.device_class,
                                                  device->dev.bus_id, event, 0);
        default:
index 2d67e92c8ff70635e510dfc621bf6e7d2243292a..a578986e3214fc9b479ef6978d645e9002137bed 100644 (file)
@@ -440,7 +440,7 @@ static int acpi_sbs_generate_event(struct acpi_device *device,
        strcpy(acpi_device_bid(device), bid);
        strcpy(acpi_device_class(device), class);
 
-       result = acpi_bus_generate_event(device, event, state);
+       result = acpi_bus_generate_proc_event(device, event, state);
 
        strcpy(acpi_device_bid(device), bid_saved);
        strcpy(acpi_device_class(device), class_saved);
index 291758c9a4d6052c046865c78250d4169a64406a..2c9cfe297f73f0c403cc58c0acc57e12913d0e2c 100644 (file)
@@ -485,7 +485,7 @@ static int acpi_thermal_critical(struct acpi_thermal *tz)
        printk(KERN_EMERG
               "Critical temperature reached (%ld C), shutting down.\n",
               KELVIN_TO_CELSIUS(tz->temperature));
-       acpi_bus_generate_event(tz->device, ACPI_THERMAL_NOTIFY_CRITICAL,
+       acpi_bus_generate_proc_event(tz->device, ACPI_THERMAL_NOTIFY_CRITICAL,
                                tz->trips.critical.flags.enabled);
        acpi_bus_generate_netlink_event(tz->device->pnp.device_class,
                                          tz->device->dev.bus_id,
@@ -508,7 +508,7 @@ static int acpi_thermal_hot(struct acpi_thermal *tz)
        } else if (tz->trips.hot.flags.enabled)
                tz->trips.hot.flags.enabled = 0;
 
-       acpi_bus_generate_event(tz->device, ACPI_THERMAL_NOTIFY_HOT,
+       acpi_bus_generate_proc_event(tz->device, ACPI_THERMAL_NOTIFY_HOT,
                                tz->trips.hot.flags.enabled);
        acpi_bus_generate_netlink_event(tz->device->pnp.device_class,
                                          tz->device->dev.bus_id,
@@ -1157,14 +1157,14 @@ static void acpi_thermal_notify(acpi_handle handle, u32 event, void *data)
        case ACPI_THERMAL_NOTIFY_THRESHOLDS:
                acpi_thermal_get_trip_points(tz);
                acpi_thermal_check(tz);
-               acpi_bus_generate_event(device, event, 0);
+               acpi_bus_generate_proc_event(device, event, 0);
                acpi_bus_generate_netlink_event(device->pnp.device_class,
                                                  device->dev.bus_id, event, 0);
                break;
        case ACPI_THERMAL_NOTIFY_DEVICES:
                if (tz->flags.devices)
                        acpi_thermal_get_devices(tz);
-               acpi_bus_generate_event(device, event, 0);
+               acpi_bus_generate_proc_event(device, event, 0);
                acpi_bus_generate_netlink_event(device->pnp.device_class,
                                                  device->dev.bus_id, event, 0);
                break;
index d98701941981421837a7c622da0a416eccad8442..9a5cfcfd8da5c49d012af9124248f3d06edbeaa2 100644 (file)
@@ -1775,7 +1775,7 @@ static void acpi_video_bus_notify(acpi_handle handle, u32 event, void *data)
        switch (event) {
        case ACPI_VIDEO_NOTIFY_SWITCH:  /* User requested a switch,
                                         * most likely via hotkey. */
-               acpi_bus_generate_event(device, event, 0);
+               acpi_bus_generate_proc_event(device, event, 0);
                break;
 
        case ACPI_VIDEO_NOTIFY_PROBE:   /* User plugged in or removed a video
@@ -1783,14 +1783,14 @@ static void acpi_video_bus_notify(acpi_handle handle, u32 event, void *data)
                acpi_video_device_enumerate(video);
                acpi_video_device_rebind(video);
                acpi_video_switch_output(video, event);
-               acpi_bus_generate_event(device, event, 0);
+               acpi_bus_generate_proc_event(device, event, 0);
                break;
 
        case ACPI_VIDEO_NOTIFY_CYCLE:   /* Cycle Display output hotkey pressed. */
        case ACPI_VIDEO_NOTIFY_NEXT_OUTPUT:     /* Next Display output hotkey pressed. */
        case ACPI_VIDEO_NOTIFY_PREV_OUTPUT:     /* previous Display output hotkey pressed. */
                acpi_video_switch_output(video, event);
-               acpi_bus_generate_event(device, event, 0);
+               acpi_bus_generate_proc_event(device, event, 0);
                break;
 
        default:
@@ -1815,7 +1815,7 @@ static void acpi_video_device_notify(acpi_handle handle, u32 event, void *data)
        switch (event) {
        case ACPI_VIDEO_NOTIFY_SWITCH:  /* change in status (cycle output device) */
        case ACPI_VIDEO_NOTIFY_PROBE:   /* change in status (output device status) */
-               acpi_bus_generate_event(device, event, 0);
+               acpi_bus_generate_proc_event(device, event, 0);
                break;
        case ACPI_VIDEO_NOTIFY_CYCLE_BRIGHTNESS:        /* Cycle brightness */
        case ACPI_VIDEO_NOTIFY_INC_BRIGHTNESS:  /* Increase brightness */
@@ -1823,7 +1823,7 @@ static void acpi_video_device_notify(acpi_handle handle, u32 event, void *data)
        case ACPI_VIDEO_NOTIFY_ZERO_BRIGHTNESS: /* zero brightnesss */
        case ACPI_VIDEO_NOTIFY_DISPLAY_OFF:     /* display device off */
                acpi_video_switch_brightness(video_device, event);
-               acpi_bus_generate_event(device, event, 0);
+               acpi_bus_generate_proc_event(device, event, 0);
                break;
        default:
                ACPI_DEBUG_PRINT((ACPI_DB_INFO,
index aeec67e27264463c5697ac4652212d8a8e13fb73..859858561ab6705e5f398117dc5e83e8866df77c 100644 (file)
@@ -875,7 +875,7 @@ found:
 
 #ifdef CONFIG_ACPI
        if (sonypi_acpi_device)
-               acpi_bus_generate_event(sonypi_acpi_device, 1, event);
+               acpi_bus_generate_proc_event(sonypi_acpi_device, 1, event);
 #endif
 
        kfifo_put(sonypi_device.fifo, (unsigned char *)&event, sizeof(event));
index d0fc4fd212e6814ae1ce4f6c852ac30f5e8ec137..f8ae58f016373d637148704e728f68e401cb2f74 100644 (file)
@@ -732,7 +732,7 @@ static void asus_hotk_notify(acpi_handle handle, u32 event, void *data)
                lcd_blank(FB_BLANK_POWERDOWN);
        }
 
-       acpi_bus_generate_event(hotk->device, event,
+       acpi_bus_generate_proc_event(hotk->device, event,
                                hotk->event_count[event % 128]++);
 
        return;
index 91da6880ae9390fc2e46490836cd7de97ba27367..743bd49ae6f58b6a8a4c79acd7b608f69671cd26 100644 (file)
@@ -904,7 +904,7 @@ static void sony_acpi_notify(acpi_handle handle, u32 event, void *data)
 
        dprintk("sony_acpi_notify, event: 0x%.2x\n", ev);
        sony_laptop_report_input_event(ev);
-       acpi_bus_generate_event(sony_nc_acpi_device, 1, ev);
+       acpi_bus_generate_proc_event(sony_nc_acpi_device, 1, ev);
 }
 
 static acpi_status sony_walk_callback(acpi_handle handle, u32 level,
@@ -2292,7 +2292,7 @@ static irqreturn_t sony_pic_irq(int irq, void *dev_id)
 
 found:
        sony_laptop_report_input_event(device_event);
-       acpi_bus_generate_event(spic_dev.acpi_dev, 1, device_event);
+       acpi_bus_generate_proc_event(spic_dev.acpi_dev, 1, device_event);
        sonypi_compat_report_event(device_event);
 
        return IRQ_HANDLED;
index d0825a34a7b035948ac02f50009fd344b1dd6b57..bb8956d0c1047fce4eb35f2323072b8438e59e40 100644 (file)
@@ -1190,10 +1190,10 @@ static void hotkey_notify(struct ibm_struct *ibm, u32 event)
                }
 
                if (sendacpi)
-                       acpi_bus_generate_event(ibm->acpi->device, event, hkey);
+                       acpi_bus_generate_proc_event(ibm->acpi->device, event, hkey);
        } else {
                printk(IBM_ERR "unknown hotkey notification event %d\n", event);
-               acpi_bus_generate_event(ibm->acpi->device, event, 0);
+               acpi_bus_generate_proc_event(ibm->acpi->device, event, 0);
        }
 }
 
@@ -2179,7 +2179,7 @@ static void dock_notify(struct ibm_struct *ibm, u32 event)
                       event, _sta(dock_handle));
                data = 0;       /* unknown */
        }
-       acpi_bus_generate_event(ibm->acpi->device, event, data);
+       acpi_bus_generate_proc_event(ibm->acpi->device, event, data);
        acpi_bus_generate_netlink_event(ibm->acpi->device->pnp.device_class,
                                          ibm->acpi->device->dev.bus_id,
                                          event, data);
@@ -2280,7 +2280,7 @@ static int __init bay_init(struct ibm_init_struct *iibm)
 
 static void bay_notify(struct ibm_struct *ibm, u32 event)
 {
-       acpi_bus_generate_event(ibm->acpi->device, event, 0);
+       acpi_bus_generate_proc_event(ibm->acpi->device, event, 0);
        acpi_bus_generate_netlink_event(ibm->acpi->device->pnp.device_class,
                                          ibm->acpi->device->dev.bus_id,
                                          event, 0);
index 360902476bad6ef753143ca33f6694f97300a33d..d2c410cd3c45ab076f539cb768b30424e5311cb2 100644 (file)
@@ -267,7 +267,7 @@ static void ibm_handle_events(acpi_handle handle, u32 event, void *context)
 
        if (subevent == 0x80) {
                dbg("%s: generationg bus event\n", __FUNCTION__);
-               acpi_bus_generate_event(note->device, note->event, detail);
+               acpi_bus_generate_proc_event(note->device, note->event, detail);
                acpi_bus_generate_netlink_event(note->device->pnp.device_class,
                                                  note->device->dev.bus_id,
                                                  note->event, detail);
index 8203cddeb4cb1c9854f05a1c3be387b62aaf3e82..86aea44ce6d447a83ed0146288f514c225171314 100644 (file)
@@ -331,8 +331,13 @@ void acpi_bus_data_handler(acpi_handle handle, u32 function, void *context);
 int acpi_bus_get_status(struct acpi_device *device);
 int acpi_bus_get_power(acpi_handle handle, int *state);
 int acpi_bus_set_power(acpi_handle handle, int state);
-int acpi_bus_generate_event(struct acpi_device *device, u8 type, int data);
+#ifdef CONFIG_ACPI_PROC_EVENT
+int acpi_bus_generate_proc_event(struct acpi_device *device, 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
 int acpi_bus_register_driver(struct acpi_driver *driver);
 void acpi_bus_unregister_driver(struct acpi_driver *driver);
 int acpi_bus_add(struct acpi_device **child, struct acpi_device *parent,