diff mbox series

[RESEND,v1,8/8] thermal: trip: Drop thermal_zone_get_trip()

Message ID 2220301.Mh6RI2rZIc@rjwysocki.net
State New
Headers show
Series thermal: Use trip pointers in thermal driver interface | expand

Commit Message

Rafael J. Wysocki July 29, 2024, 4:12 p.m. UTC
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

There are no more callers of thermal_zone_get_trip() in the tree, so
drop it.

No functional impact.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
 drivers/thermal/thermal_trip.c |   14 --------------
 include/linux/thermal.h        |    2 --
 2 files changed, 16 deletions(-)

Comments

Lukasz Luba Aug. 2, 2024, 9:56 a.m. UTC | #1
On 7/29/24 17:12, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> 
> There are no more callers of thermal_zone_get_trip() in the tree, so
> drop it.
> 
> No functional impact.
> 
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
>   drivers/thermal/thermal_trip.c |   14 --------------
>   include/linux/thermal.h        |    2 --
>   2 files changed, 16 deletions(-)
> 
> Index: linux-pm/drivers/thermal/thermal_trip.c
> ===================================================================
> --- linux-pm.orig/drivers/thermal/thermal_trip.c
> +++ linux-pm/drivers/thermal/thermal_trip.c
> @@ -108,20 +108,6 @@ void thermal_zone_set_trips(struct therm
>   		dev_err(&tz->device, "Failed to set trips: %d\n", ret);
>   }
>   
> -int thermal_zone_get_trip(struct thermal_zone_device *tz, int trip_id,
> -			  struct thermal_trip *trip)
> -{
> -	if (!tz || !trip || trip_id < 0 || trip_id >= tz->num_trips)
> -		return -EINVAL;
> -
> -	mutex_lock(&tz->lock);
> -	*trip = tz->trips[trip_id].trip;
> -	mutex_unlock(&tz->lock);
> -
> -	return 0;
> -}
> -EXPORT_SYMBOL_GPL(thermal_zone_get_trip);
> -
>   int thermal_zone_trip_id(const struct thermal_zone_device *tz,
>   			 const struct thermal_trip *trip)
>   {
> Index: linux-pm/include/linux/thermal.h
> ===================================================================
> --- linux-pm.orig/include/linux/thermal.h
> +++ linux-pm/include/linux/thermal.h
> @@ -202,8 +202,6 @@ static inline void devm_thermal_of_zone_
>   }
>   #endif
>   
> -int thermal_zone_get_trip(struct thermal_zone_device *tz, int trip_id,
> -			  struct thermal_trip *trip);
>   int for_each_thermal_trip(struct thermal_zone_device *tz,
>   			  int (*cb)(struct thermal_trip *, void *),
>   			  void *data);
> 
> 
> 


Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
diff mbox series

Patch

Index: linux-pm/drivers/thermal/thermal_trip.c
===================================================================
--- linux-pm.orig/drivers/thermal/thermal_trip.c
+++ linux-pm/drivers/thermal/thermal_trip.c
@@ -108,20 +108,6 @@  void thermal_zone_set_trips(struct therm
 		dev_err(&tz->device, "Failed to set trips: %d\n", ret);
 }
 
-int thermal_zone_get_trip(struct thermal_zone_device *tz, int trip_id,
-			  struct thermal_trip *trip)
-{
-	if (!tz || !trip || trip_id < 0 || trip_id >= tz->num_trips)
-		return -EINVAL;
-
-	mutex_lock(&tz->lock);
-	*trip = tz->trips[trip_id].trip;
-	mutex_unlock(&tz->lock);
-
-	return 0;
-}
-EXPORT_SYMBOL_GPL(thermal_zone_get_trip);
-
 int thermal_zone_trip_id(const struct thermal_zone_device *tz,
 			 const struct thermal_trip *trip)
 {
Index: linux-pm/include/linux/thermal.h
===================================================================
--- linux-pm.orig/include/linux/thermal.h
+++ linux-pm/include/linux/thermal.h
@@ -202,8 +202,6 @@  static inline void devm_thermal_of_zone_
 }
 #endif
 
-int thermal_zone_get_trip(struct thermal_zone_device *tz, int trip_id,
-			  struct thermal_trip *trip);
 int for_each_thermal_trip(struct thermal_zone_device *tz,
 			  int (*cb)(struct thermal_trip *, void *),
 			  void *data);