Commit 8f3f4ad4 authored by Daniel Lezcano's avatar Daniel Lezcano Committed by Rafael J. Wysocki

thermal/hwmon: Do not set no_hwmon before calling thermal_add_hwmon_sysfs()

The thermal->tzp->no_hwmon parameter is only used when calling
thermal_zone_device_register().

Setting it to 'false' before calling thermal_add_hwmon_sysfs() has no
effect.

Remove the call and again prevent the drivers to access the thermal
internals.

Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> #R-Car
Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: Florian Fainelli <f.fainelli@gmail.com> #Broadcom
Acked-by: Heiko Stuebner <heiko@sntech.de> #rockchip
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent abda7383
...@@ -98,7 +98,6 @@ static int bcm2711_thermal_probe(struct platform_device *pdev) ...@@ -98,7 +98,6 @@ static int bcm2711_thermal_probe(struct platform_device *pdev)
priv->thermal = thermal; priv->thermal = thermal;
thermal->tzp->no_hwmon = false;
return thermal_add_hwmon_sysfs(thermal); return thermal_add_hwmon_sysfs(thermal);
} }
......
...@@ -267,7 +267,6 @@ static int bcm2835_thermal_probe(struct platform_device *pdev) ...@@ -267,7 +267,6 @@ static int bcm2835_thermal_probe(struct platform_device *pdev)
* Thermal_zone doesn't enable hwmon as default, * Thermal_zone doesn't enable hwmon as default,
* enable it here * enable it here
*/ */
tz->tzp->no_hwmon = false;
err = thermal_add_hwmon_sysfs(tz); err = thermal_add_hwmon_sysfs(tz);
if (err) if (err)
goto err_tz; goto err_tz;
......
...@@ -527,7 +527,6 @@ static int rcar_gen3_thermal_probe(struct platform_device *pdev) ...@@ -527,7 +527,6 @@ static int rcar_gen3_thermal_probe(struct platform_device *pdev)
} }
tsc->zone = zone; tsc->zone = zone;
tsc->zone->tzp->no_hwmon = false;
ret = thermal_add_hwmon_sysfs(tsc->zone); ret = thermal_add_hwmon_sysfs(tsc->zone);
if (ret) if (ret)
goto error_unregister; goto error_unregister;
......
...@@ -509,11 +509,6 @@ static int rcar_thermal_probe(struct platform_device *pdev) ...@@ -509,11 +509,6 @@ static int rcar_thermal_probe(struct platform_device *pdev)
} }
if (chip->use_of_thermal) { if (chip->use_of_thermal) {
/*
* thermal_zone doesn't enable hwmon as default,
* but, enable it here to keep compatible
*/
priv->zone->tzp->no_hwmon = false;
ret = thermal_add_hwmon_sysfs(priv->zone); ret = thermal_add_hwmon_sysfs(priv->zone);
if (ret) if (ret)
goto error_unregister; goto error_unregister;
......
...@@ -1451,7 +1451,6 @@ static int rockchip_thermal_probe(struct platform_device *pdev) ...@@ -1451,7 +1451,6 @@ static int rockchip_thermal_probe(struct platform_device *pdev)
for (i = 0; i < thermal->chip->chn_num; i++) { for (i = 0; i < thermal->chip->chn_num; i++) {
rockchip_thermal_toggle_sensor(&thermal->sensors[i], true); rockchip_thermal_toggle_sensor(&thermal->sensors[i], true);
thermal->sensors[i].tzd->tzp->no_hwmon = false;
error = thermal_add_hwmon_sysfs(thermal->sensors[i].tzd); error = thermal_add_hwmon_sysfs(thermal->sensors[i].tzd);
if (error) if (error)
dev_warn(&pdev->dev, dev_warn(&pdev->dev,
......
...@@ -216,7 +216,6 @@ static int rzg2l_thermal_probe(struct platform_device *pdev) ...@@ -216,7 +216,6 @@ static int rzg2l_thermal_probe(struct platform_device *pdev)
} }
priv->zone = zone; priv->zone = zone;
priv->zone->tzp->no_hwmon = false;
ret = thermal_add_hwmon_sysfs(priv->zone); ret = thermal_add_hwmon_sysfs(priv->zone);
if (ret) if (ret)
goto err; goto err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment