[PATCH] pwm: Add missing dummy for devm_pwmchip_add()
From: Geert Uytterhoeven
Date: Tue Oct 25 2022 - 10:08:13 EST
The PWM subsystem supports compile-testing if CONFIG_PWM is disabled.
However, no dummy is provided for devm_pwmchip_add(), which may lead to
build failures.
Fixes: bcda91bf86c1ff76 ("pwm: Add a device-managed function to add PWM chips")
Signed-off-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
---
include/linux/pwm.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/include/linux/pwm.h b/include/linux/pwm.h
index d70c6e5a839d6902..bba492eea96c5552 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)
--
2.25.1