From 1696d9dc57e062ce5200f6a42a6aaada15b434bb Mon Sep 17 00:00:00 2001 From: Thomas Renninger Date: Mon, 15 Jul 2013 10:15:09 +0200 Subject: ACPI: Remove the old /proc/acpi/event interface It is quite some time that this one has been deprecated. Get rid of it. Should some really important user be overseen, it may be reverted and the userspace program worked on first, but it is time to do something to get rid of this old stuff... Signed-off-by: Thomas Renninger Acked-by: Matthew Garrett Acked-by: Henrique de Moraes Holschuh Signed-off-by: Rafael J. Wysocki --- drivers/acpi/thermal.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'drivers/acpi/thermal.c') 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; -- cgit v1.1 From 8a6036b92620a4ea0a1285d5c134ac9610ff4b32 Mon Sep 17 00:00:00 2001 From: Lan Tianyu Date: Wed, 14 Aug 2013 21:00:37 +0800 Subject: ACPI / thermal: Remove the unused lock of struct acpi_thermal The acpi_thermal->lock now just is initialized when a thermal zone device is added and destroyed when the thermal zone is removed. It is never used in any other places, so remove it. Signed-off-by: Lan Tianyu Acked-by: Zhang Rui Acked-by: Durgadoss R Signed-off-by: Rafael J. Wysocki --- drivers/acpi/thermal.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'drivers/acpi/thermal.c') diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c index 547a906..dc1ba6c 100644 --- a/drivers/acpi/thermal.c +++ b/drivers/acpi/thermal.c @@ -190,7 +190,6 @@ struct acpi_thermal { struct thermal_zone_device *thermal_zone; int tz_enabled; int kelvin_offset; - struct mutex lock; }; /* -------------------------------------------------------------------------- @@ -1098,8 +1097,6 @@ static int acpi_thermal_add(struct acpi_device *device) strcpy(acpi_device_name(device), ACPI_THERMAL_DEVICE_NAME); strcpy(acpi_device_class(device), ACPI_THERMAL_CLASS); device->driver_data = tz; - mutex_init(&tz->lock); - result = acpi_thermal_get_info(tz); if (result) @@ -1132,7 +1129,6 @@ static int acpi_thermal_remove(struct acpi_device *device) tz = acpi_driver_data(device); acpi_thermal_unregister_thermal_zone(tz); - mutex_destroy(&tz->lock); kfree(tz); return 0; } -- cgit v1.1 From b22131c254a9a3cfe0184b234ab8bd737b4c8ba2 Mon Sep 17 00:00:00 2001 From: Lan Tianyu Date: Wed, 14 Aug 2013 21:00:38 +0800 Subject: ACPI / thermal: Remove unused macros in the driver/acpi/thermal.c The ACPI_THERMAL_FILE* macros are not used now, so remove them. Signed-off-by: Lan Tianyu Acked-by: Zhang Rui Acked-by: Durgadoss R Signed-off-by: Rafael J. Wysocki --- drivers/acpi/thermal.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'drivers/acpi/thermal.c') diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c index dc1ba6c..eccd22d 100644 --- a/drivers/acpi/thermal.c +++ b/drivers/acpi/thermal.c @@ -50,11 +50,6 @@ #define ACPI_THERMAL_CLASS "thermal_zone" #define ACPI_THERMAL_DEVICE_NAME "Thermal Zone" -#define ACPI_THERMAL_FILE_STATE "state" -#define ACPI_THERMAL_FILE_TEMPERATURE "temperature" -#define ACPI_THERMAL_FILE_TRIP_POINTS "trip_points" -#define ACPI_THERMAL_FILE_COOLING_MODE "cooling_mode" -#define ACPI_THERMAL_FILE_POLLING_FREQ "polling_frequency" #define ACPI_THERMAL_NOTIFY_TEMPERATURE 0x80 #define ACPI_THERMAL_NOTIFY_THRESHOLDS 0x81 #define ACPI_THERMAL_NOTIFY_DEVICES 0x82 -- cgit v1.1 From 70f2903b506100396dbdb301ae1ead74842a6894 Mon Sep 17 00:00:00 2001 From: Lan Tianyu Date: Wed, 14 Aug 2013 21:00:39 +0800 Subject: ACPI / thermal: Use THERMAL_TRIPS_NONE macro to replace number It's unreadable to pass "-1" as trip parameter directly to thermal_zone_bind_cooling_device(). Use THERMAL_TRIPS_NONE instead. Signed-off-by: Lan Tianyu Acked-by: Zhang Rui Acked-by: Durgadoss R Signed-off-by: Rafael J. Wysocki --- drivers/acpi/thermal.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'drivers/acpi/thermal.c') diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c index eccd22d..ccf9527 100644 --- a/drivers/acpi/thermal.c +++ b/drivers/acpi/thermal.c @@ -843,12 +843,13 @@ static int acpi_thermal_cooling_device_cb(struct thermal_zone_device *thermal, if (ACPI_SUCCESS(status) && (dev == device)) { if (bind) result = thermal_zone_bind_cooling_device - (thermal, -1, cdev, - THERMAL_NO_LIMIT, + (thermal, THERMAL_TRIPS_NONE, + cdev, THERMAL_NO_LIMIT, THERMAL_NO_LIMIT); else result = thermal_zone_unbind_cooling_device - (thermal, -1, cdev); + (thermal, THERMAL_TRIPS_NONE, + cdev); if (result) goto failed; } -- cgit v1.1