Skip to content

Commit

Permalink
thermal/core: Remove unused functions rebind/unbind exception
Browse files Browse the repository at this point in the history
The functions thermal_zone_device_rebind_exception and
thermal_zone_device_unbind_exception are not used from anywhere.

Remove that code.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Thara Gopinath <thara.gopinath@linaro.org>
Link: https://lore.kernel.org/r/20201214233811.485669-2-daniel.lezcano@linaro.org
  • Loading branch information
Daniel Lezcano committed Jan 19, 2021
1 parent a7d6ba1 commit a20b995
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 41 deletions.
37 changes: 0 additions & 37 deletions drivers/thermal/thermal_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -598,26 +598,6 @@ static void thermal_zone_device_check(struct work_struct *work)
thermal_zone_device_update(tz, THERMAL_EVENT_UNSPECIFIED);
}

void thermal_zone_device_rebind_exception(struct thermal_zone_device *tz,
const char *cdev_type, size_t size)
{
struct thermal_cooling_device *cdev = NULL;

mutex_lock(&thermal_list_lock);
list_for_each_entry(cdev, &thermal_cdev_list, node) {
/* skip non matching cdevs */
if (strncmp(cdev_type, cdev->type, size))
continue;

/* re binding the exception matching the type pattern */
thermal_zone_bind_cooling_device(tz, THERMAL_TRIPS_NONE, cdev,
THERMAL_NO_LIMIT,
THERMAL_NO_LIMIT,
THERMAL_WEIGHT_DEFAULT);
}
mutex_unlock(&thermal_list_lock);
}

int for_each_thermal_governor(int (*cb)(struct thermal_governor *, void *),
void *data)
{
Expand Down Expand Up @@ -685,23 +665,6 @@ struct thermal_zone_device *thermal_zone_get_by_id(int id)
return match;
}

void thermal_zone_device_unbind_exception(struct thermal_zone_device *tz,
const char *cdev_type, size_t size)
{
struct thermal_cooling_device *cdev = NULL;

mutex_lock(&thermal_list_lock);
list_for_each_entry(cdev, &thermal_cdev_list, node) {
/* skip non matching cdevs */
if (strncmp(cdev_type, cdev->type, size))
continue;
/* unbinding the exception matching the type pattern */
thermal_zone_unbind_cooling_device(tz, THERMAL_TRIPS_NONE,
cdev);
}
mutex_unlock(&thermal_list_lock);
}

/*
* Device management section: cooling devices, zones devices, and binding
*
Expand Down
4 changes: 0 additions & 4 deletions drivers/thermal/thermal_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,6 @@ struct thermal_instance {

int thermal_register_governor(struct thermal_governor *);
void thermal_unregister_governor(struct thermal_governor *);
void thermal_zone_device_rebind_exception(struct thermal_zone_device *,
const char *, size_t);
void thermal_zone_device_unbind_exception(struct thermal_zone_device *,
const char *, size_t);
int thermal_zone_device_set_policy(struct thermal_zone_device *, char *);
int thermal_build_list_of_policies(char *buf);

Expand Down

0 comments on commit a20b995

Please sign in to comment.