Message ID | 20181215023010.2857-7-marek.vasut+renesas@gmail.com (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Geert Uytterhoeven |
Headers | show |
Series | thermal: Align devm_thermal_zone_{device,of_sensor}_register | expand |
On Sat, Dec 15, 2018 at 03:30:10AM +0100, Marek Vasut wrote: > Use devm_thermal_zone_of_sensor_register_params() with thermal zone > params to enable the hwmon sysfs interface. > > Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> > Cc: Daniel Lezcano <daniel.lezcano@linaro.org> > Cc: Eduardo Valentin <edubezval@gmail.com> > Cc: Wolfram Sang <wsa+renesas@sang-engineering.com> > Cc: Zhang Rui <rui.zhang@intel.com> > Cc: linux-renesas-soc@vger.kernel.org > To: linux-pm@vger.kernel.org Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
diff --git a/drivers/thermal/rcar_gen3_thermal.c b/drivers/thermal/rcar_gen3_thermal.c index 75786cc8e2f9..d86b8e746313 100644 --- a/drivers/thermal/rcar_gen3_thermal.c +++ b/drivers/thermal/rcar_gen3_thermal.c @@ -85,6 +85,10 @@ struct rcar_gen3_thermal_priv { void (*thermal_init)(struct rcar_gen3_thermal_tsc *tsc); }; +static struct thermal_zone_params rcar_gen3_tz_of_params = { + .no_hwmon = false, +}; + static inline u32 rcar_gen3_thermal_read(struct rcar_gen3_thermal_tsc *tsc, u32 reg) { @@ -416,8 +420,8 @@ static int rcar_gen3_thermal_probe(struct platform_device *pdev) priv->thermal_init(tsc); rcar_gen3_thermal_calc_coefs(&tsc->coef, ptat, thcode[i]); - zone = devm_thermal_zone_of_sensor_register(dev, i, tsc, - &rcar_gen3_tz_of_ops); + zone = devm_thermal_zone_of_sensor_register_params(dev, i, tsc, + &rcar_gen3_tz_of_ops, &rcar_gen3_tz_of_params); if (IS_ERR(zone)) { dev_err(dev, "Can't register thermal zone\n"); ret = PTR_ERR(zone);
Use devm_thermal_zone_of_sensor_register_params() with thermal zone params to enable the hwmon sysfs interface. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Daniel Lezcano <daniel.lezcano@linaro.org> Cc: Eduardo Valentin <edubezval@gmail.com> Cc: Wolfram Sang <wsa+renesas@sang-engineering.com> Cc: Zhang Rui <rui.zhang@intel.com> Cc: linux-renesas-soc@vger.kernel.org To: linux-pm@vger.kernel.org --- V2: No change --- drivers/thermal/rcar_gen3_thermal.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)