Skip to content

Commit 0747c71

Browse files
ukleinekclaudiubeznea
authored andcommitted
pwm: atmel-hlcdc: Use pwmchip_add() instead of pwmchip_add_with_polarity()
The only side effect of this change is that pwm->state.polarity is initialized to PWM_POLARITY_NORMAL instead of PWM_POLARITY_INVERSED. However all other members of pwm->state are uninitialized and consumers are expected to provide the right polarity (either by setting it explicitly or by using a helper like pwm_init_state() that overwrites .polarity anyhow with a value independent of the initial value). Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
1 parent ecc827c commit 0747c71

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/pwm/pwm-atmel-hlcdc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ static int atmel_hlcdc_pwm_probe(struct platform_device *pdev)
270270
chip->chip.of_xlate = of_pwm_xlate_with_flags;
271271
chip->chip.of_pwm_n_cells = 3;
272272

273-
ret = pwmchip_add_with_polarity(&chip->chip, PWM_POLARITY_INVERSED);
273+
ret = pwmchip_add(&chip->chip);
274274
if (ret) {
275275
clk_disable_unprepare(hlcdc->periph_clk);
276276
return ret;

0 commit comments

Comments
 (0)