From fc423f29f718a963a2775edba8ac258e762ea989 Mon Sep 17 00:00:00 2001 From: Uwe Kleine-König Date: Mon, 7 Dec 2020 14:45:54 +0100 Subject: pwm: bcm-kona: Use pwmchip_add() instead of pwmchip_add_with_polarity() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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). The eventual goal is to remove pwmchip_add_with_polarity() and so simplify the data flow in the PWM core. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding --- drivers/pwm/pwm-bcm-kona.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/pwm') diff --git a/drivers/pwm/pwm-bcm-kona.c b/drivers/pwm/pwm-bcm-kona.c index 2e8aede0318c..f09a31042859 100644 --- a/drivers/pwm/pwm-bcm-kona.c +++ b/drivers/pwm/pwm-bcm-kona.c @@ -300,7 +300,7 @@ static int kona_pwmc_probe(struct platform_device *pdev) clk_disable_unprepare(kp->clk); - ret = pwmchip_add_with_polarity(&kp->chip, PWM_POLARITY_INVERSED); + ret = pwmchip_add(&kp->chip); if (ret < 0) dev_err(&pdev->dev, "failed to add PWM chip: %d\n", ret); -- cgit