ACPI/Thermal: Remove the unused lock of struct acpi_thermal
Subsystems (2)
PATCH 1/3 ACPI/Thermal: Remove the unused lock of struct acpi_thermal
From: Lan Tianyu <[email protected]>
The acpi_thermal->lock now just is initialized when thermal zone device is added and destroyed when thermal zone is removed. Never being used any other places. So remove it.
--- drivers/acpi/thermal.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/acpi/thermal.c +0 -4
@@ -190,7 +190,6 @@ struct acpi_thermal {struct thermal_zone_device *thermal_zone;int tz_enabled;int kelvin_offset; -struct mutex lock; };/* --------------------------------------------------------------------------
@@ -1088,8 +1087,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)
@@ -1122,7 +1119,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 ; }
Signature · 1 line
1.8.4.rc0.1.g8f6a3e5.dirty
PATCH 2/3 ACPI/Thermal: Remove unused macro in the driver/acpi/thermal.c
From: Lan Tianyu <[email protected]>
The ACPI_THERMAL_FILE* macros are not used now and so remove them.
--- drivers/acpi/thermal.c | 5 ----- 1 file changed, 5 deletions(-)
drivers/acpi/thermal.c +0 -5
@@ -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
Signature · 1 line
1.8.4.rc0.1.g8f6a3e5.dirty
PATCH 3/3 ACPI/Thermal: Use THERMAL_TRIPS_NONE macro to replace number
In reply to [email protected]From: Lan Tianyu <[email protected]>
It's unreadable to pass "-1" as trip param directly to thermal_zone_bind_cooling_device. So use THERMAL_TRIPS_NONE to replace it.
--- drivers/acpi/thermal.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/acpi/thermal.c +4 -3
@@ -833,12 +833,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; }
Signature · 1 line
1.8.4.rc0.1.g8f6a3e5.dirty
Quoted 10 lines
-----Original Message-----
From: [email protected] [mailto:linux-acpi- [email protected]] On Behalf Of [email protected]
Sent: Wednesday, August 14, 2013 6:31 PM
To: [email protected]; [email protected]
Cc: Lan, Tianyu; [email protected]; Zhang, Rui
Subject: [PATCH 1/3] ACPI/Thermal: Remove the unused lock of structacpi_thermal
Quoted 6 lines
From: Lan Tianyu <[email protected]>
The
acpi_thermal->locknow just is initialized when thermal zone device is added and destroyed when thermal zone is removed. Never being used any other places. So remove it.
Hi Tianyu,
Very Nice catch. All three patches look fine to me. For all three,
Thanks,
Durga
Quoted 43 lines
Acked-by Zhang Rui <[email protected]>Signed-off-by Lan Tianyu <[email protected]>--- drivers/acpi/thermal.c | 4 ---- 1 file changed, 4 deletions(-)drivers/acpi/thermal.c +0
-4@@ -190,7 +190,6 @@ struct acpi_thermal {struct thermal_zone_device *thermal_zone;int tz_enabled;int kelvin_offset; -struct mutex lock; };/* -------------------------------------------------------------------------- @@ -1088,8 +1087,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)@@ -1122,7 +1119,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 ;}
--
1.8.4.rc0.1.g8f6a3e5.dirty--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 17 lines · Durgadoss
Quoted 10 lines
-----Original Message-----
From: [email protected] [mailto:linux-acpi- [email protected]] On Behalf Of [email protected]
Sent: Wednesday, August 14, 2013 6:31 PM
To: [email protected]; [email protected]
Cc: Lan, Tianyu; [email protected]; Zhang, Rui
Subject: [PATCH 1/3] ACPI/Thermal: Remove the unused lock of structacpi_thermalQuoted 6 lines
From: Lan Tianyu <[email protected]>
The
acpi_thermal->locknow just is initialized when thermal zone device is added and destroyed when thermal zone is removed. Never being used any other places. So remove it.
Quoted 5 lines
Hi Tianyu,
Very Nice catch. All three patches look fine to me. For all three,
Acked-by Durgadoss R <[email protected]>
Thanks for Acks.
Quoted 47 lines
Thanks,
DurgaQuoted 43 lines
Acked-by Zhang Rui <[email protected]>Signed-off-by Lan Tianyu <[email protected]>--- drivers/acpi/thermal.c | 4 ---- 1 file changed, 4 deletions(-)drivers/acpi/thermal.c +0
-4@@ -190,7 +190,6 @@ struct acpi_thermal {struct thermal_zone_device *thermal_zone;int tz_enabled;int kelvin_offset; -struct mutex lock; };/* -------------------------------------------------------------------------- @@ -1088,8 +1087,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)@@ -1122,7 +1119,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 ;}
--
1.8.4.rc0.1.g8f6a3e5.dirty--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 6 lines
Best regards Tianyu Lan -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 18 lines · Lan Tianyu
Quoted 17 lines · Durgadoss
Quoted 16 lines
-----Original Message-----
From: [email protected] [mailto:linux-acpi- [email protected]] On Behalf Of [email protected]
Sent: Wednesday, August 14, 2013 6:31 PM
To: [email protected]; [email protected]
Cc: Lan, Tianyu; [email protected]; Zhang, Rui
Subject: [PATCH 1/3] ACPI/Thermal: Remove the unused lock of structacpi_thermalFrom: Lan Tianyu <[email protected]>
The
acpi_thermal->locknow just is initialized when thermal zone device is added and destroyed when thermal zone is removed. Never being used any other places. So remove it.
Quoted 7 lines
Quoted 5 lines
Hi Tianyu,
Very Nice catch. All three patches look fine to me. For all three,
Acked-by Durgadoss R <[email protected]>Thanks for Acks.
Whole series queued up for 3.12.
Thanks,
Rafael
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html