From 1897e5586311f639e9a2e1bbf30d9b42322901ea Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 2 Aug 2023 08:51:41 +0200 Subject: [PATCH] 5.15-stable patches added patches: pwm-add-a-stub-for-devm_pwmchip_add.patch --- .../pwm-add-a-stub-for-devm_pwmchip_add.patch | 39 +++++++++++++++++++ queue-5.15/series | 1 + 2 files changed, 40 insertions(+) create mode 100644 queue-5.15/pwm-add-a-stub-for-devm_pwmchip_add.patch diff --git a/queue-5.15/pwm-add-a-stub-for-devm_pwmchip_add.patch b/queue-5.15/pwm-add-a-stub-for-devm_pwmchip_add.patch new file mode 100644 index 00000000000..e8e9ce4a4dd --- /dev/null +++ b/queue-5.15/pwm-add-a-stub-for-devm_pwmchip_add.patch @@ -0,0 +1,39 @@ +From 88da4e8113110d5f4ebdd2f8cd0899e300cd1954 Mon Sep 17 00:00:00 2001 +From: Andy Shevchenko +Date: Thu, 17 Nov 2022 13:08:00 +0200 +Subject: pwm: Add a stub for devm_pwmchip_add() +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Andy Shevchenko + +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 +Acked-by: Thierry Reding +Reviewed-by: Mika Westerberg +Acked-by: Uwe Kleine-König +Signed-off-by: Greg Kroah-Hartman +--- + include/linux/pwm.h | 5 +++++ + 1 file changed, 5 insertions(+) + +--- a/include/linux/pwm.h ++++ b/include/linux/pwm.h +@@ -489,6 +489,11 @@ static inline int pwmchip_remove(struct + 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) diff --git a/queue-5.15/series b/queue-5.15/series index 2950e60139f..b3b50d1d258 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -2,6 +2,7 @@ jbd2-fix-wrongly-judgement-for-buffer-head-removing-.patch kvm-s390-pv-fix-index-value-of-replaced-asce.patch io_uring-don-t-audit-the-capability-check-in-io_urin.patch gpio-tps68470-make-tps68470_gpio_output-always-set-t.patch +pwm-add-a-stub-for-devm_pwmchip_add.patch gpio-mvebu-make-use-of-devm_pwmchip_add.patch gpio-mvebu-fix-irq-domain-leak.patch btrfs-fix-race-between-quota-disable-and-relocation.patch -- 2.47.3