Message ID | 20201205165146.3866846-3-uwe@kleine-koenig.org |
---|---|
State | Superseded |
Headers | show |
Series | [1/3] pwm: bcm-kona: Use pwmchip_add() instead of pwmchip_add_with_polarity() | expand |
On Sat, Dec 05, 2020 at 05:51:46PM +0100, Uwe Kleine-König wrote: > pwmchip_add() only calls pwmchip_add_with_polarity() and nothing else. All > other users of pwmchip_add_with_polarity() are gone. So drop > pwmchip_add_with_polarity() and move the code instead to pwmchip_add(). > > The initial assignment to pwm->state.polarity is dropped. In every correct > usage of the PWM API this value is overwritten later anyhow. > > Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org> > --- > include/linux/pwm.h | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/include/linux/pwm.h b/include/linux/pwm.h > index e4d84d4db293..8f4eefd129aa 100644 > --- a/include/linux/pwm.h > +++ b/include/linux/pwm.h > @@ -392,8 +392,6 @@ int pwm_capture(struct pwm_device *pwm, struct pwm_capture *result, > int pwm_set_chip_data(struct pwm_device *pwm, void *data); > void *pwm_get_chip_data(struct pwm_device *pwm); > > -int pwmchip_add_with_polarity(struct pwm_chip *chip, > - enum pwm_polarity polarity); I forgot the relevant change in drivers/pwm/core.c. I will resend. Best regards Uwe
diff --git a/include/linux/pwm.h b/include/linux/pwm.h index e4d84d4db293..8f4eefd129aa 100644 --- a/include/linux/pwm.h +++ b/include/linux/pwm.h @@ -392,8 +392,6 @@ int pwm_capture(struct pwm_device *pwm, struct pwm_capture *result, int pwm_set_chip_data(struct pwm_device *pwm, void *data); void *pwm_get_chip_data(struct pwm_device *pwm); -int pwmchip_add_with_polarity(struct pwm_chip *chip, - enum pwm_polarity polarity); int pwmchip_add(struct pwm_chip *chip); int pwmchip_remove(struct pwm_chip *chip); struct pwm_device *pwm_request_from_chip(struct pwm_chip *chip,
pwmchip_add() only calls pwmchip_add_with_polarity() and nothing else. All other users of pwmchip_add_with_polarity() are gone. So drop pwmchip_add_with_polarity() and move the code instead to pwmchip_add(). The initial assignment to pwm->state.polarity is dropped. In every correct usage of the PWM API this value is overwritten later anyhow. Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org> --- include/linux/pwm.h | 2 -- 1 file changed, 2 deletions(-)