> --- a/drivers/hwmon/hwmon.c
> +++ b/drivers/hwmon/hwmon.c
> @@ -161,6 +161,11 @@ static int hwmon_thermal_add_sensor(struct device *dev,
> if (IS_ERR(tzd) && (PTR_ERR(tzd) != -ENODEV))
> return PTR_ERR(tzd);
>
> + if (!IS_ERR(tzd)) {
> +
> --- a/drivers/hwmon/hwmon.c
> +++ b/drivers/hwmon/hwmon.c
> @@ -161,6 +161,11 @@ static int hwmon_thermal_add_sensor(struct device *dev,
> if (IS_ERR(tzd) && (PTR_ERR(tzd) != -ENODEV))
> return PTR_ERR(tzd);
>
> + if (!IS_ERR(tzd)) {
> +
[devm]_thermal_zone_of_sensor_register() is used to register
thermal sensor by thermal drivers using DeviceTree. Besides
registering sensor this function also immediately:
- enables it:
tzd->ops->set_mode(tzd, THERMAL_DEVICE_ENABLED)
(->set_mode is set to of_thermal_set_mode() in
[devm]_thermal_zone_of_sensor_register() is used to register
thermal sensor by thermal drivers using DeviceTree. Besides
registering sensor this function also immediately:
- enables it:
tzd->ops->set_mode(tzd, THERMAL_DEVICE_ENABLED)
(->set_mode is set to of_thermal_set_mode() in
4 matches
Mail list logo