pwm: atmel-tcb: prepare clk before calling enable
authorBoris BREZILLON <b.brezillon@overkiz.com>
Fri, 7 Jun 2013 16:26:42 +0000 (18:26 +0200)
committerThierry Reding <thierry.reding@gmail.com>
Wed, 12 Jun 2013 10:51:44 +0000 (12:51 +0200)
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>
drivers/pwm/pwm-atmel-tcb.c

index 0a7b6582edb109f58ce1ce26189d37600fde1173..09be626a61a03a683e841fbe3813fb6a88763cad 100644 (file)
@@ -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);
 }