aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhang Rui <rui.zhang@intel.com>2013-04-24 12:04:06 -0400
committerZhang Rui <rui.zhang@intel.com>2013-04-24 12:04:06 -0400
commita502be187385666441d4d6fe66efd4179a74d779 (patch)
tree9d808bc035da51c092084fe3faf4cd5f0a611360
parent335553ce40f0e551383482ad6b0b0eba87f4f218 (diff)
parentb6cee53c19991269968fa0038f3b80048cf3727c (diff)
Merge branch 'exynos-fix' of .git into next
-rw-r--r--drivers/thermal/exynos_thermal.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/thermal/exynos_thermal.c b/drivers/thermal/exynos_thermal.c
index e34d842cc675..d20ce9e61403 100644
--- a/drivers/thermal/exynos_thermal.c
+++ b/drivers/thermal/exynos_thermal.c
@@ -855,6 +855,10 @@ static const struct of_device_id exynos_tmu_match[] = {
855 .data = (void *)EXYNOS4210_TMU_DRV_DATA, 855 .data = (void *)EXYNOS4210_TMU_DRV_DATA,
856 }, 856 },
857 { 857 {
858 .compatible = "samsung,exynos4412-tmu",
859 .data = (void *)EXYNOS_TMU_DRV_DATA,
860 },
861 {
858 .compatible = "samsung,exynos5250-tmu", 862 .compatible = "samsung,exynos5250-tmu",
859 .data = (void *)EXYNOS_TMU_DRV_DATA, 863 .data = (void *)EXYNOS_TMU_DRV_DATA,
860 }, 864 },
@@ -937,12 +941,16 @@ static int exynos_tmu_probe(struct platform_device *pdev)
937 return ret; 941 return ret;
938 } 942 }
939 943
940 data->clk = clk_get(NULL, "tmu_apbif"); 944 data->clk = devm_clk_get(&pdev->dev, "tmu_apbif");
941 if (IS_ERR(data->clk)) { 945 if (IS_ERR(data->clk)) {
942 dev_err(&pdev->dev, "Failed to get clock\n"); 946 dev_err(&pdev->dev, "Failed to get clock\n");
943 return PTR_ERR(data->clk); 947 return PTR_ERR(data->clk);
944 } 948 }
945 949
950 ret = clk_prepare(data->clk);
951 if (ret)
952 return ret;
953
946 if (pdata->type == SOC_ARCH_EXYNOS || 954 if (pdata->type == SOC_ARCH_EXYNOS ||
947 pdata->type == SOC_ARCH_EXYNOS4210) 955 pdata->type == SOC_ARCH_EXYNOS4210)
948 data->soc = pdata->type; 956 data->soc = pdata->type;
@@ -994,7 +1002,7 @@ static int exynos_tmu_probe(struct platform_device *pdev)
994 return 0; 1002 return 0;
995err_clk: 1003err_clk:
996 platform_set_drvdata(pdev, NULL); 1004 platform_set_drvdata(pdev, NULL);
997 clk_put(data->clk); 1005 clk_unprepare(data->clk);
998 return ret; 1006 return ret;
999} 1007}
1000 1008
@@ -1006,7 +1014,7 @@ static int exynos_tmu_remove(struct platform_device *pdev)
1006 1014
1007 exynos_unregister_thermal(); 1015 exynos_unregister_thermal();
1008 1016
1009 clk_put(data->clk); 1017 clk_unprepare(data->clk);
1010 1018
1011 platform_set_drvdata(pdev, NULL); 1019 platform_set_drvdata(pdev, NULL);
1012 1020