From 8f3f4ad4ad45e2e30c814de42629ef4c9688e92c Mon Sep 17 00:00:00 2001 From: Daniel Lezcano Date: Wed, 1 Mar 2023 21:14:35 +0100 Subject: thermal/hwmon: Do not set no_hwmon before calling thermal_add_hwmon_sysfs() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 #R-Car Signed-off-by: Daniel Lezcano Acked-by: Florian Fainelli #Broadcom Acked-by: Heiko Stuebner #rockchip Signed-off-by: Rafael J. Wysocki --- drivers/thermal/rcar_thermal.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'drivers/thermal/rcar_thermal.c') diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c index e0440f63ae77..b8571f7090aa 100644 --- a/drivers/thermal/rcar_thermal.c +++ b/drivers/thermal/rcar_thermal.c @@ -509,11 +509,6 @@ static int rcar_thermal_probe(struct platform_device *pdev) } 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); if (ret) goto error_unregister; -- cgit v1.2.3