Skip to content

Commit 69ee15f

Browse files
tq-schiffermthierryreding
authored andcommitted
pwm: pca9685: Remove unused duty_cycle struct element
duty_cycle was only set, never read. Signed-off-by: Matthias Schiffer <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
1 parent cef6df8 commit 69ee15f

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

drivers/pwm/pwm-pca9685.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@
6969
struct pca9685 {
7070
struct pwm_chip chip;
7171
struct regmap *regmap;
72-
int duty_ns;
7372
int period_ns;
7473
#if IS_ENABLED(CONFIG_GPIOLIB)
7574
struct mutex lock;
@@ -272,8 +271,6 @@ static int pca9685_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,
272271
}
273272
}
274273

275-
pca->duty_ns = duty_ns;
276-
277274
if (duty_ns < 1) {
278275
if (pwm->hwpwm >= PCA9685_MAXCHAN)
279276
reg = PCA9685_ALL_LED_OFF_H;
@@ -449,7 +446,6 @@ static int pca9685_pwm_probe(struct i2c_client *client,
449446
ret);
450447
return ret;
451448
}
452-
pca->duty_ns = 0;
453449
pca->period_ns = PCA9685_DEFAULT_PERIOD;
454450

455451
i2c_set_clientdata(client, pca);

0 commit comments

Comments
 (0)