These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / drivers / pwm / pwm-tiehrpwm.c
index 694b3cf..6a41e66 100644 (file)
@@ -407,7 +407,7 @@ static void ehrpwm_pwm_free(struct pwm_chip *chip, struct pwm_device *pwm)
 {
        struct ehrpwm_pwm_chip *pc = to_ehrpwm_pwm_chip(chip);
 
-       if (test_bit(PWMF_ENABLED, &pwm->flags)) {
+       if (pwm_is_enabled(pwm)) {
                dev_warn(chip->dev, "Removing PWM device without disabling\n");
                pm_runtime_put_sync(chip->dev);
        }
@@ -565,7 +565,7 @@ static int ehrpwm_pwm_suspend(struct device *dev)
        for (i = 0; i < pc->chip.npwm; i++) {
                struct pwm_device *pwm = &pc->chip.pwms[i];
 
-               if (!test_bit(PWMF_ENABLED, &pwm->flags))
+               if (!pwm_is_enabled(pwm))
                        continue;
 
                /* Disable explicitly if PWM is running */
@@ -582,7 +582,7 @@ static int ehrpwm_pwm_resume(struct device *dev)
        for (i = 0; i < pc->chip.npwm; i++) {
                struct pwm_device *pwm = &pc->chip.pwms[i];
 
-               if (!test_bit(PWMF_ENABLED, &pwm->flags))
+               if (!pwm_is_enabled(pwm))
                        continue;
 
                /* Enable explicitly if PWM was running */