aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBoris BREZILLON <b.brezillon@overkiz.com>2013-06-07 12:26:42 -0400
committerThierry Reding <thierry.reding@gmail.com>2013-06-12 06:51:44 -0400
commit8796f9c5656dedd186eda88c07db6a58d1985938 (patch)
tree41c0301ffb5afa2021573b53bfe0eb1a64bc32c3 /drivers
parent77f0b9d2ff0c8ff7b36033dfc5b29dab7a0ebd9a (diff)
pwm: atmel-tcb: prepare clk before calling enable
Replace clk_enable/disable with clk_prepare_enable/disable_unprepare to avoid common clk framework warnings. Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/pwm/pwm-atmel-tcb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pwm/pwm-atmel-tcb.c b/drivers/pwm/pwm-atmel-tcb.c
index 0a7b6582edb1..09be626a61a0 100644
--- a/drivers/pwm/pwm-atmel-tcb.c
+++ b/drivers/pwm/pwm-atmel-tcb.c
@@ -76,7 +76,7 @@ static int atmel_tcb_pwm_request(struct pwm_chip *chip,
76 if (!tcbpwm) 76 if (!tcbpwm)
77 return -ENOMEM; 77 return -ENOMEM;
78 78
79 ret = clk_enable(tc->clk[group]); 79 ret = clk_prepare_enable(tc->clk[group]);
80 if (ret) { 80 if (ret) {
81 devm_kfree(chip->dev, tcbpwm); 81 devm_kfree(chip->dev, tcbpwm);
82 return ret; 82 return ret;
@@ -124,7 +124,7 @@ static void atmel_tcb_pwm_free(struct pwm_chip *chip, struct pwm_device *pwm)
124 struct atmel_tcb_pwm_device *tcbpwm = pwm_get_chip_data(pwm); 124 struct atmel_tcb_pwm_device *tcbpwm = pwm_get_chip_data(pwm);
125 struct atmel_tc *tc = tcbpwmc->tc; 125 struct atmel_tc *tc = tcbpwmc->tc;
126 126
127 clk_disable(tc->clk[pwm->hwpwm / 2]); 127 clk_disable_unprepare(tc->clk[pwm->hwpwm / 2]);
128 tcbpwmc->pwms[pwm->hwpwm] = NULL; 128 tcbpwmc->pwms[pwm->hwpwm] = NULL;
129 devm_kfree(chip->dev, tcbpwm); 129 devm_kfree(chip->dev, tcbpwm);
130} 130}