]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.15-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 2 Aug 2023 06:51:41 +0000 (08:51 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 2 Aug 2023 06:51:41 +0000 (08:51 +0200)
added patches:
pwm-add-a-stub-for-devm_pwmchip_add.patch

queue-5.15/pwm-add-a-stub-for-devm_pwmchip_add.patch [new file with mode: 0644]
queue-5.15/series

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 (file)
index 0000000..e8e9ce4
--- /dev/null
@@ -0,0 +1,39 @@
+From 88da4e8113110d5f4ebdd2f8cd0899e300cd1954 Mon Sep 17 00:00:00 2001
+From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+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 <andriy.shevchenko@linux.intel.com>
+
+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>
+---
+ 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)
index 2950e60139f921ab653961bc2de1f7c5e7d70994..b3b50d1d25865f6c86c49baab497815dd608b484 100644 (file)
@@ -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