diff options
| author | Mark Brown <[email protected]> | 2015-10-12 18:09:27 +0100 | 
|---|---|---|
| committer | Mark Brown <[email protected]> | 2015-10-12 18:09:27 +0100 | 
| commit | 79828b4fa835f73cdaf4bffa48696abdcbea9d02 (patch) | |
| tree | 5e0fa7156acb75ba603022bc807df8f2fedb97a8 /drivers/pwm/pwm-atmel.c | |
| parent | 721b51fcf91898299d96f4b72cb9434cda29dce6 (diff) | |
| parent | 8c1a9d6323abf0fb1e5dad96cf3f1c783505ea5a (diff) | |
Merge remote-tracking branch 'asoc/fix/rt5645' into asoc-fix-rt5645
Diffstat (limited to 'drivers/pwm/pwm-atmel.c')
| -rw-r--r-- | drivers/pwm/pwm-atmel.c | 6 | 
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/pwm/pwm-atmel.c b/drivers/pwm/pwm-atmel.c index a947c9095d9d..0e4bd4e8e582 100644 --- a/drivers/pwm/pwm-atmel.c +++ b/drivers/pwm/pwm-atmel.c @@ -114,7 +114,7 @@ static int atmel_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,  	u32 val;  	int ret; -	if (test_bit(PWMF_ENABLED, &pwm->flags) && (period_ns != pwm->period)) { +	if (pwm_is_enabled(pwm) && (period_ns != pwm_get_period(pwm))) {  		dev_err(chip->dev, "cannot change PWM period while enabled\n");  		return -EBUSY;  	} @@ -176,7 +176,7 @@ static void atmel_pwm_config_v1(struct pwm_chip *chip, struct pwm_device *pwm,  	 * If the PWM channel is enabled, only update CDTY by using the update  	 * register, it needs to set bit 10 of CMR to 0  	 */ -	if (test_bit(PWMF_ENABLED, &pwm->flags)) +	if (pwm_is_enabled(pwm))  		return;  	/*  	 * If the PWM channel is disabled, write value to duty and period @@ -191,7 +191,7 @@ static void atmel_pwm_config_v2(struct pwm_chip *chip, struct pwm_device *pwm,  {  	struct atmel_pwm_chip *atmel_pwm = to_atmel_pwm_chip(chip); -	if (test_bit(PWMF_ENABLED, &pwm->flags)) { +	if (pwm_is_enabled(pwm)) {  		/*  		 * If the PWM channel is enabled, using the duty update register  		 * to update the value.  |