From: Matthias Schiffer Date: Wed, 26 Feb 2020 13:52:26 +0000 (+0100) Subject: pwm: pca9685: Remove unused duty_cycle struct element X-Git-Tag: v5.15~4075^2~22 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=69ee15f1b7a506b0484d58f2ee6add598fbca29f;p=platform%2Fkernel%2Flinux-starfive.git pwm: pca9685: Remove unused duty_cycle struct element duty_cycle was only set, never read. Signed-off-by: Matthias Schiffer Signed-off-by: Thierry Reding --- diff --git a/drivers/pwm/pwm-pca9685.c b/drivers/pwm/pwm-pca9685.c index b07bdca..19ac971 100644 --- a/drivers/pwm/pwm-pca9685.c +++ b/drivers/pwm/pwm-pca9685.c @@ -69,7 +69,6 @@ struct pca9685 { struct pwm_chip chip; struct regmap *regmap; - int duty_ns; int period_ns; #if IS_ENABLED(CONFIG_GPIOLIB) struct mutex lock; @@ -272,8 +271,6 @@ static int pca9685_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, } } - pca->duty_ns = duty_ns; - if (duty_ns < 1) { if (pwm->hwpwm >= PCA9685_MAXCHAN) reg = PCA9685_ALL_LED_OFF_H; @@ -449,7 +446,6 @@ static int pca9685_pwm_probe(struct i2c_client *client, ret); return ret; } - pca->duty_ns = 0; pca->period_ns = PCA9685_DEFAULT_PERIOD; i2c_set_clientdata(client, pca);