diff options
| author | Boris BREZILLON <[email protected]> | 2013-06-07 16:26:42 +0000 |
|---|---|---|
| committer | Thierry Reding <[email protected]> | 2013-06-12 10:51:44 +0000 |
| commit | 8796f9c5656dedd186eda88c07db6a58d1985938 (patch) | |
| tree | 41c0301ffb5afa2021573b53bfe0eb1a64bc32c3 /drivers/pwm/pwm-atmel-tcb.c | |
| parent | pwm: devm: alloc correct pointer size (diff) | |
| download | kernel-8796f9c5656dedd186eda88c07db6a58d1985938.tar.gz kernel-8796f9c5656dedd186eda88c07db6a58d1985938.zip | |
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 <[email protected]>
Signed-off-by: Thierry Reding <[email protected]>
Diffstat (limited to 'drivers/pwm/pwm-atmel-tcb.c')
| -rw-r--r-- | drivers/pwm/pwm-atmel-tcb.c | 4 |
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, if (!tcbpwm) return -ENOMEM; - ret = clk_enable(tc->clk[group]); + ret = clk_prepare_enable(tc->clk[group]); if (ret) { devm_kfree(chip->dev, tcbpwm); return ret; @@ -124,7 +124,7 @@ static void atmel_tcb_pwm_free(struct pwm_chip *chip, struct pwm_device *pwm) struct atmel_tcb_pwm_device *tcbpwm = pwm_get_chip_data(pwm); struct atmel_tc *tc = tcbpwmc->tc; - clk_disable(tc->clk[pwm->hwpwm / 2]); + clk_disable_unprepare(tc->clk[pwm->hwpwm / 2]); tcbpwmc->pwms[pwm->hwpwm] = NULL; devm_kfree(chip->dev, tcbpwm); } |
