Skip to content

Commit

Permalink
thermal/core: Make cooling device state change private
Browse files Browse the repository at this point in the history
The change of the cooling device state should be used by the governor
or at least by the core code, not by the drivers themselves.

Remove the API usage and move the function declaration to the internal
headers.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Zhang Rui <rui.zhang@intel.com>
Link: https://lore.kernel.org/r/20210118173824.9970-1-daniel.lezcano@linaro.org
  • Loading branch information
Daniel Lezcano committed Jan 19, 2021
1 parent 0367196 commit 23ff852
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 5 deletions.
1 change: 0 additions & 1 deletion drivers/hwmon/pwm-fan.c
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,6 @@ static int pwm_fan_probe(struct platform_device *pdev)
return ret;
}
ctx->cdev = cdev;
thermal_cdev_update(cdev);
}

return 0;
Expand Down
1 change: 0 additions & 1 deletion drivers/thermal/khadas_mcu_fan.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ static int khadas_mcu_fan_probe(struct platform_device *pdev)
return ret;
}
ctx->cdev = cdev;
thermal_cdev_update(cdev);

return 0;
}
Expand Down
2 changes: 2 additions & 0 deletions drivers/thermal/thermal_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ static inline bool cdev_is_power_actor(struct thermal_cooling_device *cdev)
cdev->ops->power2state;
}

void thermal_cdev_update(struct thermal_cooling_device *);

/**
* struct thermal_trip - representation of a point in temperature domain
* @np: pointer to struct device_node that this trip point was created from
Expand Down
3 changes: 0 additions & 3 deletions include/linux/thermal.h
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,6 @@ int thermal_zone_get_temp(struct thermal_zone_device *tz, int *temp);
int thermal_zone_get_slope(struct thermal_zone_device *tz);
int thermal_zone_get_offset(struct thermal_zone_device *tz);

void thermal_cdev_update(struct thermal_cooling_device *);
void thermal_notify_framework(struct thermal_zone_device *, int);
int thermal_zone_device_enable(struct thermal_zone_device *tz);
int thermal_zone_device_disable(struct thermal_zone_device *tz);
Expand Down Expand Up @@ -437,8 +436,6 @@ static inline int thermal_zone_get_offset(
struct thermal_zone_device *tz)
{ return -ENODEV; }

static inline void thermal_cdev_update(struct thermal_cooling_device *cdev)
{ }
static inline void thermal_notify_framework(struct thermal_zone_device *tz,
int trip)
{ }
Expand Down

0 comments on commit 23ff852

Please sign in to comment.