From c920aa341ef176c540d8894adb37a219ece5443d Mon Sep 17 00:00:00 2001 From: Eduardo Valentin Date: Tue, 23 Apr 2013 21:48:12 +0000 Subject: [PATCH] --- yaml --- r: 374565 b: refs/heads/master c: c7a8b9d91642cb858862de613652aad5d21632be h: refs/heads/master i: 374563: 2ac2c9d7deefe95bf5bd962ab888d8d3f1678361 v: v3 --- [refs] | 2 +- trunk/drivers/thermal/exynos_thermal.c | 14 +++----------- trunk/drivers/thermal/thermal_core.c | 4 ++-- 3 files changed, 6 insertions(+), 14 deletions(-) diff --git a/[refs] b/[refs] index 4239e1981aa8..d8548f262ee3 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a502be187385666441d4d6fe66efd4179a74d779 +refs/heads/master: c7a8b9d91642cb858862de613652aad5d21632be diff --git a/trunk/drivers/thermal/exynos_thermal.c b/trunk/drivers/thermal/exynos_thermal.c index d20ce9e61403..e34d842cc675 100644 --- a/trunk/drivers/thermal/exynos_thermal.c +++ b/trunk/drivers/thermal/exynos_thermal.c @@ -854,10 +854,6 @@ 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, @@ -941,16 +937,12 @@ static int exynos_tmu_probe(struct platform_device *pdev) return ret; } - data->clk = devm_clk_get(&pdev->dev, "tmu_apbif"); + data->clk = clk_get(NULL, "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; @@ -1002,7 +994,7 @@ static int exynos_tmu_probe(struct platform_device *pdev) return 0; err_clk: platform_set_drvdata(pdev, NULL); - clk_unprepare(data->clk); + clk_put(data->clk); return ret; } @@ -1014,7 +1006,7 @@ static int exynos_tmu_remove(struct platform_device *pdev) exynos_unregister_thermal(); - clk_unprepare(data->clk); + clk_put(data->clk); platform_set_drvdata(pdev, NULL); diff --git a/trunk/drivers/thermal/thermal_core.c b/trunk/drivers/thermal/thermal_core.c index c0779adb2459..768ad312ba29 100644 --- a/trunk/drivers/thermal/thermal_core.c +++ b/trunk/drivers/thermal/thermal_core.c @@ -1301,7 +1301,7 @@ thermal_cooling_device_register(char *type, void *devdata, return ERR_PTR(result); } - strcpy(cdev->type, type ? : ""); + strlcpy(cdev->type, type ? : "", sizeof(cdev->type)); mutex_init(&cdev->lock); INIT_LIST_HEAD(&cdev->thermal_instances); cdev->ops = ops; @@ -1606,7 +1606,7 @@ struct thermal_zone_device *thermal_zone_device_register(const char *type, return ERR_PTR(result); } - strcpy(tz->type, type ? : ""); + strlcpy(tz->type, type ? : "", sizeof(tz->type)); tz->ops = ops; tz->tzp = tzp; tz->device.class = &thermal_class;