From d989b5b65c2acd8e93dd11311884964f22df6c6a Mon Sep 17 00:00:00 2001 From: David Wu Date: Tue, 20 Oct 2015 17:10:58 +0800 Subject: [PATCH] rk3368: thermal: remove unused code and fix style Change-Id: Ie9e370082e422f528b4156a56b4ebc881686b12a Signed-off-by: David Wu --- drivers/thermal/rockchip_thermal.c | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/drivers/thermal/rockchip_thermal.c b/drivers/thermal/rockchip_thermal.c index b20cc3722bdb..6c63571f005e 100755 --- a/drivers/thermal/rockchip_thermal.c +++ b/drivers/thermal/rockchip_thermal.c @@ -114,9 +114,6 @@ struct rockchip_thermal_data { struct clk *clk; struct clk *pclk; - struct regmap *cru; - struct regmap *grf; - struct regmap *pmu; int cpu_temp_adjust; int gpu_temp_adjust; @@ -914,24 +911,6 @@ static int rockchip_thermal_probe(struct platform_device *pdev) return error; } - thermal->cru = syscon_regmap_lookup_by_phandle(np, "rockchip,cru"); - if (IS_ERR(thermal->cru)) { - dev_err(&pdev->dev, "couldn't find cru regmap\n"); - return PTR_ERR(thermal->cru); - } - - thermal->pmu = syscon_regmap_lookup_by_phandle(np, "rockchip,pmu"); - if (IS_ERR(thermal->pmu)) { - dev_err(&pdev->dev, "couldn't find pmu regmap\n"); - return PTR_ERR(thermal->pmu); - } - - thermal->grf = syscon_regmap_lookup_by_phandle(np, "rockchip,grf"); - if (IS_ERR(thermal->grf)) { - dev_err(&pdev->dev, "couldn't find grf regmap\n"); - return PTR_ERR(thermal->grf); - } - thermal->clk = devm_clk_get(&pdev->dev, "tsadc"); if (IS_ERR(thermal->clk)) { error = PTR_ERR(thermal->clk); @@ -959,8 +938,9 @@ static int rockchip_thermal_probe(struct platform_device *pdev) dev_err(&pdev->dev, "failed to enable pclk: %d\n", error); goto err_disable_clk; } - + rockchip_thermal_reset_controller(thermal->reset); + error = rockchip_configure_from_dt(&pdev->dev, np, thermal); if (error) { dev_err(&pdev->dev, "failed to parse device tree data: %d\n", @@ -971,6 +951,7 @@ static int rockchip_thermal_probe(struct platform_device *pdev) if (thermal->chip->mode == TSADC_AUTO_MODE) { thermal->chip->initialize(thermal->regs, thermal->tshut_polarity); + error = rockchip_thermal_register_sensor(pdev, thermal, &thermal->sensors[0], thermal->chip->cpu_id); -- 2.34.1