diff mbox series

pwm: Remove unused function pwmchip_add_inversed()

Message ID 20201205161924.3864915-1-uwe@kleine-koenig.org
State Accepted
Headers show
Series pwm: Remove unused function pwmchip_add_inversed() | expand

Commit Message

Uwe Kleine-König Dec. 5, 2020, 4:19 p.m. UTC
This is only defined with CONFIG_PWM unset and was introduced together
with pwmchip_add_with_polarity() (which is only defined with CONFIG_PWM
enabled). I guess the series that introduced pwmchip_add_with_polarity()
had a different concept in earlier revisions and the !CONFIG_PWM part
was just not updated accordingly.

Given that there is no implementation for pwmchip_add_with_polarity()
without CONFIG_PWM, just drop pwmchip_add_inversed() instead of renaming
it to pwmchip_add_with_polarity().

Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
---
 include/linux/pwm.h | 5 -----
 1 file changed, 5 deletions(-)

Comments

Lee Jones Dec. 7, 2020, 9:22 a.m. UTC | #1
On Sat, 05 Dec 2020, Uwe Kleine-König wrote:

> This is only defined with CONFIG_PWM unset and was introduced together
> with pwmchip_add_with_polarity() (which is only defined with CONFIG_PWM
> enabled). I guess the series that introduced pwmchip_add_with_polarity()
> had a different concept in earlier revisions and the !CONFIG_PWM part
> was just not updated accordingly.
> 
> Given that there is no implementation for pwmchip_add_with_polarity()
> without CONFIG_PWM, just drop pwmchip_add_inversed() instead of renaming
> it to pwmchip_add_with_polarity().
> 
> Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
> ---
>  include/linux/pwm.h | 5 -----
>  1 file changed, 5 deletions(-)

Acked-by: Lee Jones <lee.jones@linaro.org>
Thierry Reding Dec. 10, 2020, 5:35 p.m. UTC | #2
On Sat, Dec 05, 2020 at 05:19:24PM +0100, Uwe Kleine-König wrote:
> This is only defined with CONFIG_PWM unset and was introduced together
> with pwmchip_add_with_polarity() (which is only defined with CONFIG_PWM
> enabled). I guess the series that introduced pwmchip_add_with_polarity()
> had a different concept in earlier revisions and the !CONFIG_PWM part
> was just not updated accordingly.
> 
> Given that there is no implementation for pwmchip_add_with_polarity()
> without CONFIG_PWM, just drop pwmchip_add_inversed() instead of renaming
> it to pwmchip_add_with_polarity().
> 
> Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
> ---
>  include/linux/pwm.h | 5 -----
>  1 file changed, 5 deletions(-)

Applied, thanks.

Thierry
diff mbox series

Patch

diff --git a/include/linux/pwm.h b/include/linux/pwm.h
index a13ff383fa1d..e4d84d4db293 100644
--- a/include/linux/pwm.h
+++ b/include/linux/pwm.h
@@ -473,11 +473,6 @@  static inline int pwmchip_add(struct pwm_chip *chip)
 	return -EINVAL;
 }
 
-static inline int pwmchip_add_inversed(struct pwm_chip *chip)
-{
-	return -EINVAL;
-}
-
 static inline int pwmchip_remove(struct pwm_chip *chip)
 {
 	return -EINVAL;