summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2022-11-17 13:08:00 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-08-03 10:22:26 +0200
commit34fe5fbc208fc8576c4276db71d0c145187f7eb5 (patch)
treeb7a1058fdf24dd57c62420a66697e449b8a7658f /include/linux
parentf3d2344811fdff1a0107f5dc82c72a0fdb33a037 (diff)
downloadlinux-34fe5fbc208fc8576c4276db71d0c145187f7eb5.tar.gz
linux-34fe5fbc208fc8576c4276db71d0c145187f7eb5.tar.bz2
linux-34fe5fbc208fc8576c4276db71d0c145187f7eb5.zip
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/linux')
-rw-r--r--include/linux/pwm.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/pwm.h b/include/linux/pwm.h
index 725c9b784e60..c7bfa64aeb14 100644
--- a/include/linux/pwm.h
+++ b/include/linux/pwm.h
@@ -489,6 +489,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)