diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2023-08-30 19:13:35 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2023-09-05 22:42:18 +0300 |
commit | d332db8fc1a2dfb4738281b1d6d4ed20115dd9d3 (patch) | |
tree | 55619245012cf914a6311d806151ddd8076a9703 /include | |
parent | 9ffa7b92bc768609243d79fb0c0125b9704c7061 (diff) | |
download | linux-d332db8fc1a2dfb4738281b1d6d4ed20115dd9d3.tar.xz |
thermal: core: Add function for registering tripless thermal zones
Multiple callers of thermal_zone_device_register() don't pass any trips
to it and they might use a shortened argument list for that, so add
a special function with fewer arguments for this purpose.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/thermal.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/thermal.h b/include/linux/thermal.h index a30643104f3f..1a1433eb9b59 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -317,6 +317,12 @@ struct thermal_zone_device *thermal_zone_device_register_with_trips( const struct thermal_zone_params *tzp, int passive_delay, int polling_delay); +struct thermal_zone_device *thermal_tripless_zone_device_register( + const char *type, + void *devdata, + struct thermal_zone_device_ops *ops, + const struct thermal_zone_params *tzp); + void thermal_zone_device_unregister(struct thermal_zone_device *tz); void *thermal_zone_device_priv(struct thermal_zone_device *tzd); @@ -377,6 +383,13 @@ static inline struct thermal_zone_device *thermal_zone_device_register_with_trip int passive_delay, int polling_delay) { return ERR_PTR(-ENODEV); } +static inline struct thermal_zone_device *thermal_tripless_zone_device_register( + const char *type, + void *devdata, + struct thermal_zone_device_ops *ops, + const struct thermal_zone_params *tzp) +{ return ERR_PTR(-ENODEV); } + static inline void thermal_zone_device_unregister(struct thermal_zone_device *tz) { } |