Add dev_set_drvdata(&pdev->dev, data) early in the probe function,
ensuring that the driver data is properly registered and accessible
throughout the lifecycle of the device.
Signed-off-by: Anand Moon <redacted>
---
drivers/thermal/samsung/exynos_tmu.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c
index 0e7b92035850..fe56a48be5fe 100644
--- a/drivers/thermal/samsung/exynos_tmu.c
+++ b/drivers/thermal/samsung/exynos_tmu.c
@@ -1125,6 +1125,8 @@ static int exynos_tmu_probe(struct platform_device *pdev)
if (ret)
return ret;
+ dev_set_drvdata(&pdev->dev, data);
+
data->clk = devm_clk_get_prepared(dev, "tmu_apbif");
if (IS_ERR(data->clk))
return dev_err_probe(dev, PTR_ERR(data->clk),
--
2.55.0