Re: [PATCH v2 1/6] pwm: Add a stub for devm_pwmchip_add()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello 

On Tue, Nov 08, 2022 at 04:22:21PM +0200, Andy Shevchenko wrote:
> devm_pwmchip_add() can be called by a module that optionally
> instantiates PWM chip. In case of CONFIG_PWM=n, the compilation
> can't be performed. Hence, add a necessary stub.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
> Reviewed-by: Mika Westerberg <mika.westerberg@xxxxxxxxxxxxxxx>
> ---
>  include/linux/pwm.h | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/include/linux/pwm.h b/include/linux/pwm.h
> index d70c6e5a839d..bba492eea96c 100644
> --- a/include/linux/pwm.h
> +++ b/include/linux/pwm.h
> @@ -478,6 +478,11 @@ static inline int pwmchip_remove(struct pwm_chip *chip)
>  	return -EINVAL;
>  }
>  
> +static inline int devm_pwmchip_add(struct device *dev, struct pwm_chip *chip)
> +{
> +	return -EINVAL;
> +}
> +

I'm a bit surprised to see this returning -EINVAL and not -ENOSYS. But
that's in line with the other stubs, so:

Acked-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux