Skip to content

Commit

Permalink
thermal: hwmon: inline helpers when CONFIG_THERMAL_HWMON is not set
Browse files Browse the repository at this point in the history
commit 03334ba 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: 0dd8879 ("thermal: hwmon: move hwmon support to single file")
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Eduardo Valentin authored and gregkh committed Feb 12, 2019
1 parent 0c802cb commit 56ea916
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/thermal/thermal_hwmon.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
int thermal_add_hwmon_sysfs(struct thermal_zone_device *tz);
void thermal_remove_hwmon_sysfs(struct thermal_zone_device *tz);
#else
static int
static inline int
thermal_add_hwmon_sysfs(struct thermal_zone_device *tz)
{
return 0;
}

static void
static inline void
thermal_remove_hwmon_sysfs(struct thermal_zone_device *tz)
{
}
Expand Down

0 comments on commit 56ea916

Please sign in to comment.