Skip to content

Commit

Permalink
pwm: atmel-tcb: prepare clk before calling enable
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Boris BREZILLON authored and Thierry Reding committed Jun 12, 2013
1 parent 77f0b9d commit 8796f9c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/pwm/pwm-atmel-tcb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit 8796f9c

Please sign in to comment.