thermal: core: remove thermal_zone_device_find_by_name() to avoid duplication
Laxman Dewangan [Thu, 12 Jun 2014 08:37:32 +0000 (13:37 +0530)]
The thermal core already provide API to get thermal zone by name as
thermal_zone_get_zone_by_name() and API thermal_zone_device_find_by_name()
which is developed for local downstream support duplicate of original API.

Remove the  locally added API to avoid duplication.

Change-Id: I049ddd8fb7ded52db5a3a710bf0c685be16996d5
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/422674

drivers/thermal/thermal_core.c
include/linux/thermal.h

index 72ac8a7..205675e 100644 (file)
@@ -1411,25 +1411,6 @@ struct thermal_zone_device *thermal_zone_device_find(void *data,
 }
 EXPORT_SYMBOL(thermal_zone_device_find);
 
-struct thermal_zone_device *thermal_zone_device_find_by_name(const char *name)
-{
-       struct thermal_zone_device *thz;
-
-       if (!name)
-               return NULL;
-
-       mutex_lock(&thermal_list_lock);
-       list_for_each_entry(thz, &thermal_tz_list, node) {
-               if (!strncmp(name, thz->type, strlen(name))) {
-                       mutex_unlock(&thermal_list_lock);
-                       return thz;
-               }
-       }
-       mutex_unlock(&thermal_list_lock);
-       return NULL;
-}
-EXPORT_SYMBOL(thermal_zone_device_find_by_name);
-
 /**
  * create_trip_attrs() - create attributes for trip points
  * @tz:                the thermal zone device
index 4b203c9..da35aed 100644 (file)
@@ -304,7 +304,6 @@ struct thermal_zone_device *thermal_zone_get_zone_by_name(const char *name);
 int thermal_zone_get_temp(struct thermal_zone_device *tz, unsigned long *temp);
 struct thermal_zone_device *thermal_zone_device_find(void *data,
        int (*match)(struct thermal_zone_device *, void *));
-struct thermal_zone_device *thermal_zone_device_find_by_name(const char *name);
 
 int get_tz_trend(struct thermal_zone_device *, int);
 struct thermal_instance *get_thermal_instance(struct thermal_zone_device *,