thermal/core: Move parameter validation from __thermal_zone_get_temp to thermal_zone_...
authorGuenter Roeck <linux@roeck-us.net>
Thu, 10 Nov 2022 15:24:55 +0000 (07:24 -0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 14 Nov 2022 18:04:37 +0000 (19:04 +0100)
commited97d10a8b2c78d1664b01658c5f581e6791ff7d
tree3876b7fa295e9ce3f179f6cf4a0acf1f457532b2
parent1c6b30060777352e7881383bab726046d8c3c610
thermal/core: Move parameter validation from __thermal_zone_get_temp to thermal_zone_get_temp

All callers of __thermal_zone_get_temp() already validated the
thermal zone parameters. Move validation to thermal_zone_get_temp()
where it is actually needed. Also add kernel documentation for
__thermal_zone_get_temp(), listing the requirement that the
function must be called with validated parameters and with thermal
device mutex held.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/thermal/thermal_helpers.c