From 2a16279c68bcfa34e4fe960b8276dd2d08c2e24c Mon Sep 17 00:00:00 2001 From: Sachin Kamat Date: Thu, 18 Apr 2013 11:37:58 +0000 Subject: Thermal: exynos: Add clk_{un}prepare APIs clk_{un}prepare APIs are required to migrate to common clock framework. While at it convert to use devm_clk_get as it removes some cleanup code. Signed-off-by: Sachin Kamat Cc: Amit Daniel Kachhap Acked-by: Eduardo Valentin Signed-off-by: Zhang Rui --- drivers/thermal/exynos_thermal.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'drivers/thermal/exynos_thermal.c') diff --git a/drivers/thermal/exynos_thermal.c b/drivers/thermal/exynos_thermal.c index 46568c078dee..055cd60b839f 100644 --- a/drivers/thermal/exynos_thermal.c +++ b/drivers/thermal/exynos_thermal.c @@ -985,12 +985,16 @@ static int exynos_tmu_probe(struct platform_device *pdev) return ret; } - data->clk = clk_get(NULL, "tmu_apbif"); + data->clk = devm_clk_get(&pdev->dev, "tmu_apbif"); if (IS_ERR(data->clk)) { dev_err(&pdev->dev, "Failed to get clock\n"); return PTR_ERR(data->clk); } + ret = clk_prepare(data->clk); + if (ret) + return ret; + if (pdata->type == SOC_ARCH_EXYNOS || pdata->type == SOC_ARCH_EXYNOS4210) data->soc = pdata->type; @@ -1046,7 +1050,7 @@ static int exynos_tmu_probe(struct platform_device *pdev) return 0; err_clk: platform_set_drvdata(pdev, NULL); - clk_put(data->clk); + clk_unprepare(data->clk); return ret; } @@ -1060,7 +1064,7 @@ static int exynos_tmu_remove(struct platform_device *pdev) exynos_unregister_thermal(); - clk_put(data->clk); + clk_unprepare(data->clk); platform_set_drvdata(pdev, NULL); -- cgit v1.2.3 From b6cee53c19991269968fa0038f3b80048cf3727c Mon Sep 17 00:00:00 2001 From: Sachin Kamat Date: Thu, 18 Apr 2013 11:37:59 +0000 Subject: Thermal: exynos: Add compatible string for exynos4412 Added compatible string for Exynos4412 SoC. Signed-off-by: Sachin Kamat Cc: Amit Daniel Kachhap Acked-by: Eduardo Valentin Signed-off-by: Zhang Rui --- drivers/thermal/exynos_thermal.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers/thermal/exynos_thermal.c') diff --git a/drivers/thermal/exynos_thermal.c b/drivers/thermal/exynos_thermal.c index 055cd60b839f..3d6e32a9ccdc 100644 --- a/drivers/thermal/exynos_thermal.c +++ b/drivers/thermal/exynos_thermal.c @@ -815,6 +815,10 @@ static const struct of_device_id exynos_tmu_match[] = { .compatible = "samsung,exynos4210-tmu", .data = (void *)EXYNOS4210_TMU_DRV_DATA, }, + { + .compatible = "samsung,exynos4412-tmu", + .data = (void *)EXYNOS_TMU_DRV_DATA, + }, { .compatible = "samsung,exynos5250-tmu", .data = (void *)EXYNOS_TMU_DRV_DATA, -- cgit v1.2.3