From: Eduardo Valentin Date: Wed, 9 Mar 2016 21:09:43 +0000 (-0800) Subject: thermal: convert rcar_thermal to use devm_thermal_zone_of_sensor_register X-Git-Tag: v4.13~2954^2^3~34 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=5e325868aa59d3c743aa1c9526f386f30c234cd7;p=mirror_ubuntu-bionic-kernel.git thermal: convert rcar_thermal to use devm_thermal_zone_of_sensor_register This changes the driver to use the devm_ version of thermal_zone_of_sensor_register and cleans up the local points and unregister calls. Cc: Zhang Rui Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c index 82daba09e150..71a339271fa5 100644 --- a/drivers/thermal/rcar_thermal.c +++ b/drivers/thermal/rcar_thermal.c @@ -492,7 +492,7 @@ static int rcar_thermal_probe(struct platform_device *pdev) goto error_unregister; if (of_data == USE_OF_THERMAL) - priv->zone = thermal_zone_of_sensor_register( + priv->zone = devm_thermal_zone_of_sensor_register( dev, i, priv, &rcar_thermal_zone_of_ops); else