diff mbox series

[v2,09/17] thermal: qoriq: enable+check sensor after its setup is finished

Message ID 1539791563-5959-10-git-send-email-b.zolnierkie@samsung.com (mailing list archive)
State Superseded, archived
Delegated to: Zhang Rui
Headers show
Series thermal: enable+check sensor after its setup is finished | expand

Commit Message

Bartlomiej Zolnierkiewicz Oct. 17, 2018, 3:52 p.m. UTC
Enable+check sensor after enabling monitoring.

Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
---
 drivers/thermal/qoriq_thermal.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/drivers/thermal/qoriq_thermal.c b/drivers/thermal/qoriq_thermal.c
index d8a80448..fb1750f 100644
--- a/drivers/thermal/qoriq_thermal.c
+++ b/drivers/thermal/qoriq_thermal.c
@@ -233,13 +233,13 @@  static int qoriq_tmu_probe(struct platform_device *pdev)
 		goto err_tmu;
 	}
 
-	thermal_zone_set_mode(data->tz, THERMAL_DEVICE_ENABLED);
-	thermal_zone_device_check(data->tz);
-
 	/* Enable monitoring */
 	site = 0x1 << (15 - data->sensor_id);
 	tmu_write(data, site | TMR_ME | TMR_ALPF, &data->regs->tmr);
 
+	thermal_zone_set_mode(data->tz, THERMAL_DEVICE_ENABLED);
+	thermal_zone_device_check(data->tz);
+
 	return 0;
 
 err_tmu: