Re: [PATCH v2 04/17] thermal: separate sensor registration and enable+check operations

2018-10-31 Thread Amit Kucheria
> --- 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)) { > +

Re: [PATCH v2 04/17] thermal: separate sensor registration and enable+check operations

2018-10-31 Thread Amit Kucheria
> --- 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)) { > +

[PATCH v2 04/17] thermal: separate sensor registration and enable+check operations

2018-10-17 Thread Bartlomiej Zolnierkiewicz
[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

[PATCH v2 04/17] thermal: separate sensor registration and enable+check operations

2018-10-17 Thread Bartlomiej Zolnierkiewicz
[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