aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pwm/pwm-tegra.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pwm/pwm-tegra.c')
-rw-r--r--drivers/pwm/pwm-tegra.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/pwm/pwm-tegra.c b/drivers/pwm/pwm-tegra.c
index 472b74e8221a..02ce18d5e49a 100644
--- a/drivers/pwm/pwm-tegra.c
+++ b/drivers/pwm/pwm-tegra.c
@@ -194,7 +194,7 @@ static int tegra_pwm_probe(struct platform_device *pdev)
194 194
195 platform_set_drvdata(pdev, pwm); 195 platform_set_drvdata(pdev, pwm);
196 196
197 pwm->clk = clk_get(&pdev->dev, NULL); 197 pwm->clk = devm_clk_get(&pdev->dev, NULL);
198 if (IS_ERR(pwm->clk)) 198 if (IS_ERR(pwm->clk))
199 return PTR_ERR(pwm->clk); 199 return PTR_ERR(pwm->clk);
200 200
@@ -206,7 +206,6 @@ static int tegra_pwm_probe(struct platform_device *pdev)
206 ret = pwmchip_add(&pwm->chip); 206 ret = pwmchip_add(&pwm->chip);
207 if (ret < 0) { 207 if (ret < 0) {
208 dev_err(&pdev->dev, "pwmchip_add() failed: %d\n", ret); 208 dev_err(&pdev->dev, "pwmchip_add() failed: %d\n", ret);
209 clk_put(pwm->clk);
210 return ret; 209 return ret;
211 } 210 }
212 211
@@ -233,10 +232,7 @@ static int __devexit tegra_pwm_remove(struct platform_device *pdev)
233 clk_disable_unprepare(pc->clk); 232 clk_disable_unprepare(pc->clk);
234 } 233 }
235 234
236 pwmchip_remove(&pc->chip); 235 return pwmchip_remove(&pc->chip);
237 clk_put(pc->clk);
238
239 return 0;
240} 236}
241 237
242#ifdef CONFIG_OF 238#ifdef CONFIG_OF