From: Andy Shevchenko Date: Thu, 17 Nov 2022 11:08:00 +0000 (+0200) Subject: pwm: Add a stub for devm_pwmchip_add() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=88da4e8113110d5f4ebdd2f8cd0899e300cd1954;p=linux.git pwm: Add a stub for devm_pwmchip_add() The devm_pwmchip_add() can be called by a module that optionally instantiates PWM chip. In the case of CONFIG_PWM=n, the compilation can't be performed. Hence, add a necessary stub. Signed-off-by: Andy Shevchenko Acked-by: Thierry Reding Reviewed-by: Mika Westerberg Acked-by: Uwe Kleine-König --- diff --git a/include/linux/pwm.h b/include/linux/pwm.h index d70c6e5a839d6..bba492eea96c5 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; +} + static inline struct pwm_device *pwm_request_from_chip(struct pwm_chip *chip, unsigned int index, const char *label)