]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/pwm/pwm-fsl-ftm.c
Merge tag 'selinux-pr-20191007' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux.git] / drivers / pwm / pwm-fsl-ftm.c
index 9d31a217111d03f3fb41783e11eab84c24fb4b03..59272a92047933b3c87b12f392ab3e9fa04d40bc 100644 (file)
@@ -227,7 +227,7 @@ static bool fsl_pwm_is_other_pwm_enabled(struct fsl_pwm_chip *fpc,
 
 static int fsl_pwm_apply_config(struct fsl_pwm_chip *fpc,
                                struct pwm_device *pwm,
-                               struct pwm_state *newstate)
+                               const struct pwm_state *newstate)
 {
        unsigned int duty;
        u32 reg_polarity;
@@ -292,17 +292,13 @@ static int fsl_pwm_apply_config(struct fsl_pwm_chip *fpc,
 
        regmap_update_bits(fpc->regmap, FTM_POL, BIT(pwm->hwpwm), reg_polarity);
 
-       newstate->period = fsl_pwm_ticks_to_ns(fpc,
-                                              fpc->period.mod_period + 1);
-       newstate->duty_cycle = fsl_pwm_ticks_to_ns(fpc, duty);
-
        ftm_set_write_protection(fpc);
 
        return 0;
 }
 
 static int fsl_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
-                        struct pwm_state *newstate)
+                        const struct pwm_state *newstate)
 {
        struct fsl_pwm_chip *fpc = to_fsl_chip(chip);
        struct pwm_state *oldstate = &pwm->state;