Commit acabd67a authored by Eduardo Valentin's avatar Eduardo Valentin Committed by Stefan Bader

thermal: hwmon: inline helpers when CONFIG_THERMAL_HWMON is not set

BugLink: https://bugs.launchpad.net/bugs/1818813

commit 03334ba8 upstream.

Avoid warnings like this:
thermal_hwmon.h:29:1: warning: ‘thermal_remove_hwmon_sysfs’ defined but not used [-Wunused-function]
 thermal_remove_hwmon_sysfs(struct thermal_zone_device *tz)

Fixes: 0dd88793 ("thermal: hwmon: move hwmon support to single file")
Reviewed-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: default avatarEduardo Valentin <edubezval@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarJuerg Haefliger <juergh@canonical.com>
Signed-off-by: default avatarKhalid Elmously <khalid.elmously@canonical.com>
parent 0c9a9903
...@@ -34,13 +34,13 @@ ...@@ -34,13 +34,13 @@
int thermal_add_hwmon_sysfs(struct thermal_zone_device *tz); int thermal_add_hwmon_sysfs(struct thermal_zone_device *tz);
void thermal_remove_hwmon_sysfs(struct thermal_zone_device *tz); void thermal_remove_hwmon_sysfs(struct thermal_zone_device *tz);
#else #else
static int static inline int
thermal_add_hwmon_sysfs(struct thermal_zone_device *tz) thermal_add_hwmon_sysfs(struct thermal_zone_device *tz)
{ {
return 0; return 0;
} }
static void static inline void
thermal_remove_hwmon_sysfs(struct thermal_zone_device *tz) thermal_remove_hwmon_sysfs(struct thermal_zone_device *tz)
{ {
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment