roox has uploaded this change for review. (
https://gerrit.osmocom.org/c/dahdi-linux/+/38321?usp=email )
Change subject: xpp, sysfs: Use const struct device_device if needed.
......................................................................
xpp, sysfs: Use const struct device_device if needed.
Kernel commit d69d804845985c29ab5be5a4b3b1f4787893daf8
changed struct device_driver to be const, so make the
arguments const on kernels 6.11 and newer.
Resolves: #63
Change-Id: Ibc20d83adb9b5814b05ec38a33e307ab8c9f0d51
---
M drivers/dahdi/dahdi-sysfs-chan.c
M drivers/dahdi/dahdi-sysfs.c
M drivers/dahdi/xpp/xbus-sysfs.c
3 files changed, 16 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/dahdi-linux refs/changes/21/38321/1
diff --git a/drivers/dahdi/dahdi-sysfs-chan.c b/drivers/dahdi/dahdi-sysfs-chan.c
index fcfb7ba..1efb0d7 100644
--- a/drivers/dahdi/dahdi-sysfs-chan.c
+++ b/drivers/dahdi/dahdi-sysfs-chan.c
@@ -220,7 +220,11 @@
chan_dbg(DEVICES, chan, "SYSFS\n");
}
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 11, 0)
+static int chan_match(struct device *dev, const struct device_driver *driver)
+#else
static int chan_match(struct device *dev, struct device_driver *driver)
+#endif /* LINUX_VERSION_CODE */
{
struct dahdi_chan *chan;
diff --git a/drivers/dahdi/dahdi-sysfs.c b/drivers/dahdi/dahdi-sysfs.c
index 14a6d74..f6fe1fc 100644
--- a/drivers/dahdi/dahdi-sysfs.c
+++ b/drivers/dahdi/dahdi-sysfs.c
@@ -42,7 +42,11 @@
MODULE_PARM_DESC(tools_rootdir,
"root directory of all tools paths (default /)");
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 11, 0)
+static int span_match(struct device *dev, const struct device_driver *driver)
+#else
static int span_match(struct device *dev, struct device_driver *driver)
+#endif /* LINUX_VERSION_CODE */
{
return 1;
}
diff --git a/drivers/dahdi/xpp/xbus-sysfs.c b/drivers/dahdi/xpp/xbus-sysfs.c
index 34cab65..72cd4fd 100644
--- a/drivers/dahdi/xpp/xbus-sysfs.c
+++ b/drivers/dahdi/xpp/xbus-sysfs.c
@@ -397,7 +397,11 @@
ATTRIBUTE_GROUPS(xbus_dev);
#endif
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 11, 0)
+static int astribank_match(struct device *dev, const struct device_driver *driver)
+#else
static int astribank_match(struct device *dev, struct device_driver *driver)
+#endif /* LINUX_VERSION_CODE */
{
DBG(DEVICES, "SYSFS MATCH: dev->bus_id = %s, driver->name = %s\n",
dev_name(dev), driver->name);
@@ -761,7 +765,11 @@
return len;
}
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 11, 0)
+static int xpd_match(struct device *dev, const struct device_driver *driver)
+#else
static int xpd_match(struct device *dev, struct device_driver *driver)
+#endif /* LINUX_VERSION_CODE */
{
struct xpd_driver *xpd_driver;
xpd_t *xpd;
--
To view, visit
https://gerrit.osmocom.org/c/dahdi-linux/+/38321?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: dahdi-linux
Gerrit-Branch: master
Gerrit-Change-Id: Ibc20d83adb9b5814b05ec38a33e307ab8c9f0d51
Gerrit-Change-Number: 38321
Gerrit-PatchSet: 1
Gerrit-Owner: roox <mardnh(a)gmx.de>