From 481674f6ea3aabcaebcf81eb4d6b56cb94e6e5c8 Mon Sep 17 00:00:00 2001 From: Zhang Rui Date: Thu, 25 Apr 2013 00:57:22 +0800 Subject: [PATCH] --- yaml --- r: 374574 b: refs/heads/master c: eea2d4812dbe14a00f657641a0ac3ba0a36ad33c h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/thermal/exynos_thermal.c | 14 +++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index f86892de319c..b648f7741772 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a00e55f9c8c06e2bba5db5f2e7dec16b86d560ec +refs/heads/master: eea2d4812dbe14a00f657641a0ac3ba0a36ad33c diff --git a/trunk/drivers/thermal/exynos_thermal.c b/trunk/drivers/thermal/exynos_thermal.c index e34d842cc675..d20ce9e61403 100644 --- a/trunk/drivers/thermal/exynos_thermal.c +++ b/trunk/drivers/thermal/exynos_thermal.c @@ -854,6 +854,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, @@ -937,12 +941,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; @@ -994,7 +1002,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; } @@ -1006,7 +1014,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);