Skip to content

Commit

Permalink
thermal: rcar_thermal: don't call thermal_zone_device_unregister when…
Browse files Browse the repository at this point in the history
… USE_OF_THERMAL

devm_thermal_zone_of_sensor_register() case doesn't need to call
thermal_zone_device_unregister().
Otherwise, rcar-thermal can't register thermal zone again after rebind.
This patch fixes it.

Signed-off-by: Bui Duc Phuc <bd-phuc@jinso.co.jp>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
  • Loading branch information
Bui Duc Phuc authored and Zhang Rui committed Sep 27, 2016
1 parent 7b5c4a0 commit d4b23c5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/thermal/rcar_thermal.c
Original file line number Diff line number Diff line change
Expand Up @@ -419,9 +419,10 @@ static int rcar_thermal_remove(struct platform_device *pdev)

rcar_thermal_for_each_priv(priv, common) {
rcar_thermal_irq_disable(priv);
thermal_zone_device_unregister(priv->zone);
if (rcar_use_of_thermal(dev))
thermal_remove_hwmon_sysfs(priv->zone);
else
thermal_zone_device_unregister(priv->zone);
}

pm_runtime_put(dev);
Expand Down

0 comments on commit d4b23c5

Please sign in to comment.