aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2021-10-16 17:22:24 +0200
committerHauke Mehrtens <hauke@hauke-m.de>2021-10-19 00:02:23 +0200
commitf9c2b42139099219a1b11832f4f86b89bac928c8 (patch)
tree025571eb995cc937ad6134c662a1975c1a76c259
parent2fff978b616fd83c3a969a60b4c913291bb6a446 (diff)
downloadbackports-f9c2b42139099219a1b11832f4f86b89bac928c8.tar.gz
patches: Adapt signature of bus_type->remove callback
With kernel 5.15 the return type of the bus_type->remove callback was changed from int to void. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
-rw-r--r--patches/0102-remove-callback.patch63
1 files changed, 63 insertions, 0 deletions
diff --git a/patches/0102-remove-callback.patch b/patches/0102-remove-callback.patch
new file mode 100644
index 00000000..9f5a54f1
--- /dev/null
+++ b/patches/0102-remove-callback.patch
@@ -0,0 +1,63 @@
+--- a/drivers/bcma/main.c
++++ b/drivers/bcma/main.c
+@@ -28,6 +28,7 @@ static DEFINE_MUTEX(bcma_buses_mutex);
+ static int bcma_bus_match(struct device *dev, struct device_driver *drv);
+ static int bcma_device_probe(struct device *dev);
+ static void bcma_device_remove(struct device *dev);
++static int bcma_device_remove_bp(struct device *dev);
+ static int bcma_device_uevent(struct device *dev, struct kobj_uevent_env *env);
+
+ static ssize_t manuf_show(struct device *dev, struct device_attribute *attr, char *buf)
+@@ -71,7 +72,11 @@ static struct bus_type bcma_bus_type = {
+ .name = "bcma",
+ .match = bcma_bus_match,
+ .probe = bcma_device_probe,
++#if LINUX_VERSION_IS_GEQ(5,15,0)
+ .remove = bcma_device_remove,
++#else
++ .remove = bcma_device_remove_bp,
++#endif
+ .uevent = bcma_device_uevent,
+ .dev_groups = bcma_device_groups,
+ };
+@@ -625,6 +630,12 @@ static void bcma_device_remove(struct de
+ put_device(dev);
+ }
+
++static int bcma_device_remove_bp(struct device *dev)
++{
++ bcma_device_remove(dev);
++ return 0;
++}
++
+ static int bcma_device_uevent(struct device *dev, struct kobj_uevent_env *env)
+ {
+ struct bcma_device *core = container_of(dev, struct bcma_device, dev);
+--- a/drivers/ssb/main.c
++++ b/drivers/ssb/main.c
+@@ -293,6 +293,13 @@ static void ssb_device_remove(struct dev
+ ssb_device_put(ssb_dev);
+ }
+
++static int ssb_device_remove_bp(struct device *dev)
++{
++ ssb_device_remove(dev);
++
++ return 0;
++}
++
+ static int ssb_device_probe(struct device *dev)
+ {
+ struct ssb_device *ssb_dev = dev_to_ssb_dev(dev);
+@@ -388,7 +395,11 @@ static struct bus_type ssb_bustype = {
+ .name = "ssb",
+ .match = ssb_bus_match,
+ .probe = ssb_device_probe,
++#if LINUX_VERSION_IS_GEQ(5,15,0)
+ .remove = ssb_device_remove,
++#else
++ .remove = ssb_device_remove_bp,
++#endif
+ .shutdown = ssb_device_shutdown,
+ .suspend = ssb_device_suspend,
+ .resume = ssb_device_resume,