diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2022-11-17 14:08:00 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-08-03 11:23:48 +0300 |
commit | 19156bcb881ccee406f94c9887b50803b661f70f (patch) | |
tree | ea2fbbb7f6c661f5ee530b0cc5772239a2739e19 /include | |
parent | b2d8ac988f3cd1d363a758c7e934b601e31f576d (diff) | |
download | linux-19156bcb881ccee406f94c9887b50803b661f70f.tar.xz |
pwm: Add a stub for devm_pwmchip_add()
commit 88da4e8113110d5f4ebdd2f8cd0899e300cd1954 upstream.
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 <andriy.shevchenko@linux.intel.com>
Acked-by: Thierry Reding <thierry.reding@gmail.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/pwm.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/pwm.h b/include/linux/pwm.h index 4de09163c968..161e91167b9c 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) |