瀏覽代碼

thermal: rcar_thermal: don't call thermal_zone_device_unregister when 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>
Bui Duc Phuc 9 年之前
父節點
當前提交
d4b23c5c43
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      drivers/thermal/rcar_thermal.c

+ 2 - 1
drivers/thermal/rcar_thermal.c

@@ -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);