linux_dsm_epyc7002/drivers/thermal/thermal_hwmon.h
Andrey Smirnov c7fc403e40 thermal_hwmon: Add devres wrapper for thermal_add_hwmon_sysfs()
Add devres wrapper for thermal_add_hwmon_sysfs() to simplify driver
code.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Tested-by: Lucas Stach <l.stach@pengutronix.de>
Cc: Chris Healy <cphealy@gmail.com>
Cc: Lucas Stach <l.stach@pengutronix.de>
Cc: Eduardo Valentin <edubezval@gmail.com>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Angus Ainslie (Purism) <angus@akkea.ca>
Cc: linux-imx@nxp.com
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20191210164153.10463-12-andrew.smirnov@gmail.com
2020-01-27 10:24:32 +01:00

42 lines
1.0 KiB
C

/* SPDX-License-Identifier: GPL-2.0 */
/*
* thermal_hwmon.h - Generic Thermal Management hwmon support.
*
* Code based on Intel thermal_core.c. Copyrights of the original code:
* Copyright (C) 2008 Intel Corp
* Copyright (C) 2008 Zhang Rui <rui.zhang@intel.com>
* Copyright (C) 2008 Sujith Thomas <sujith.thomas@intel.com>
*
* Copyright (C) 2013 Texas Instruments
* Copyright (C) 2013 Eduardo Valentin <eduardo.valentin@ti.com>
*/
#ifndef __THERMAL_HWMON_H__
#define __THERMAL_HWMON_H__
#include <linux/thermal.h>
#ifdef CONFIG_THERMAL_HWMON
int thermal_add_hwmon_sysfs(struct thermal_zone_device *tz);
int devm_thermal_add_hwmon_sysfs(struct thermal_zone_device *tz);
void thermal_remove_hwmon_sysfs(struct thermal_zone_device *tz);
#else
static inline int
thermal_add_hwmon_sysfs(struct thermal_zone_device *tz)
{
return 0;
}
static inline int
devm_thermal_add_hwmon_sysfs(struct thermal_zone_device *tz)
{
return 0;
}
static inline void
thermal_remove_hwmon_sysfs(struct thermal_zone_device *tz)
{
}
#endif
#endif /* __THERMAL_HWMON_H__ */