acpi: events: remove procfs interface
PATCH 5/5 acpi: events: remove procfs interface
The /proc/acpi/event interface has been replaced by events through the input layer and netlink, and scheduled for removal over four years ago.
Signed-off-by Davidlohr Bueso <[email protected]>
--- Documentation/feature-removal-schedule.txt | 8 -- 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 | 107 +--------------------------- drivers/acpi/processor_driver.c | 4 - drivers/acpi/sbs.c | 16 +---- drivers/acpi/thermal.c | 3 - drivers/acpi/video.c | 10 --- include/acpi/acpi_bus.h | 8 -- 13 files changed, 4 insertions(+), 274 deletions(-)
Documentation/feature-removal-schedule.txt +0 -8
@@ -181,14 +181,6 @@ Who: Zhang Rui <[email protected]> --------------------------- -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 <[email protected]> - ---------------------------- - What: i386/x86_64 bzImage symlinks When: April 2010
drivers/acpi/Kconfig +0 -18
@@ -74,24 +74,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
drivers/acpi/ac.c +0 -1
@@ -156,7 +156,6 @@ static void acpi_ac_notify(struct acpi_device *device, u32 event)case ACPI_NOTIFY_BUS_CHECK :case ACPI_NOTIFY_DEVICE_CHECK :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);
drivers/acpi/acpi_pad.c +0 -1
@@ -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 ;
drivers/acpi/battery.c +0 -2
@@ -657,8 +657,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));
drivers/acpi/bus.c +0 -98
104 lines not on this page · raw message
drivers/acpi/button.c +0 -2
@@ -302,8 +302,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,
drivers/acpi/event.c +1 -106
129 lines not on this page · raw message
drivers/acpi/processor_driver.c +0 -4
@@ -392,21 +392,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 );default :
drivers/acpi/sbs.c +3 -13
@@ -586,14 +586,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)))
@@ -603,12 +598,7 @@ 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 ); } }
drivers/acpi/thermal.c +0 -3
@@ -721,7 +721,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 );
@@ -917,14 +916,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 ;
drivers/acpi/video.c +0 -10
@@ -1447,7 +1447,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 );if (!acpi_notifier_call_chain (device, event,0 )) keycode =KEY_SWITCHVIDEOMODE ;break ;
@@ -1456,20 +1455,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 ;
@@ -1511,31 +1506,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 :
include/acpi/acpi_bus.h +0 -8
@@ -360,14 +360,6 @@ bool acpi_bus_power_manageable(acpi_handle handle);bool acpi_bus_can_wakeup (acpi_handle handle);int acpi_power_resource_register_device (struct device *dev,acpi_handle handle);void acpi_power_resource_unregister_device (struct device *dev,acpi_handle handle); -#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 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,
Signature · 1 line
1.7.4.1