diff mbox series

[v3,1/2] thermal: core: Add stub for thermal_zone_device_update()

Message ID 20241118-hwmon-thermal-v3-1-9c17973e7342@weissschuh.net (mailing list archive)
State Accepted
Headers show
Series hwmon: (core) Avoid ifdef CONFIG_THERMAL in C source file | expand

Commit Message

Thomas Weißschuh Nov. 18, 2024, 6:15 a.m. UTC
To simplify the !CONFIG_THERMAL case in the hwmon core,
add a !CONFIG_THERMAL stub for thermal_zone_device_update().

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
---
 include/linux/thermal.h | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Rafael J. Wysocki Nov. 25, 2024, 2:12 p.m. UTC | #1
On Mon, Nov 18, 2024 at 7:16 AM Thomas Weißschuh <linux@weissschuh.net> wrote:
>
> To simplify the !CONFIG_THERMAL case in the hwmon core,
> add a !CONFIG_THERMAL stub for thermal_zone_device_update().
>
> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
> Reviewed-by: Guenter Roeck <linux@roeck-us.net>

Acked-by: Rafael J. Wysocki <rafael@kernel.org>

and please route it through hwmon.

> ---
>  include/linux/thermal.h | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/include/linux/thermal.h b/include/linux/thermal.h
> index 25ea8fe2313e6d0a53192974a80d92f50f0ff03e..455e0814b9165dbb96d698e670f160136a017cc4 100644
> --- a/include/linux/thermal.h
> +++ b/include/linux/thermal.h
> @@ -289,6 +289,10 @@ static inline struct thermal_zone_device *thermal_tripless_zone_device_register(
>  static inline void thermal_zone_device_unregister(struct thermal_zone_device *tz)
>  { }
>
> +static inline void thermal_zone_device_update(struct thermal_zone_device *tz,
> +                                             enum thermal_notify_event event)
> +{ }
> +
>  static inline struct thermal_cooling_device *
>  thermal_cooling_device_register(const char *type, void *devdata,
>         const struct thermal_cooling_device_ops *ops)
>
> --
> 2.47.0
>
Guenter Roeck Nov. 25, 2024, 5:09 p.m. UTC | #2
On Mon, Nov 18, 2024 at 07:15:58AM +0100, Thomas Weißschuh wrote:
> To simplify the !CONFIG_THERMAL case in the hwmon core,
> add a !CONFIG_THERMAL stub for thermal_zone_device_update().
> 
> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
> Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> Acked-by: Rafael J. Wysocki <rafael@kernel.org>

Applied.

Thanks,
Guenter
diff mbox series

Patch

diff --git a/include/linux/thermal.h b/include/linux/thermal.h
index 25ea8fe2313e6d0a53192974a80d92f50f0ff03e..455e0814b9165dbb96d698e670f160136a017cc4 100644
--- a/include/linux/thermal.h
+++ b/include/linux/thermal.h
@@ -289,6 +289,10 @@  static inline struct thermal_zone_device *thermal_tripless_zone_device_register(
 static inline void thermal_zone_device_unregister(struct thermal_zone_device *tz)
 { }
 
+static inline void thermal_zone_device_update(struct thermal_zone_device *tz,
+					      enum thermal_notify_event event)
+{ }
+
 static inline struct thermal_cooling_device *
 thermal_cooling_device_register(const char *type, void *devdata,
 	const struct thermal_cooling_device_ops *ops)