[S] Change in dahdi-linux[master]: Support kernel >= 6.3.0 (bus_type.uevent() const struct device)
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/dahdi-linux/+/33184 ) Change subject: Support kernel >= 6.3.0 (bus_type.uevent() const struct device) ...................................................................... Support kernel >= 6.3.0 (bus_type.uevent() const struct device) linux kernel commit 2a81ada32f0e584fc0c943e0d3a8c9f4fae411d6 modifies the struct bus_type.uevent() argument from 'struct device *' to 'const struct device *'. Let's adjust our code to support that. Change-Id: I0c416d8fa8d7d0081fdfec6325971d6de9f8d239 --- M drivers/dahdi/dahdi-sysfs.c M drivers/dahdi/xpp/xbus-sysfs.c M include/dahdi/kernel.h 3 files changed, 25 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/dahdi-linux refs/changes/84/33184/1 diff --git a/drivers/dahdi/dahdi-sysfs.c b/drivers/dahdi/dahdi-sysfs.c index ca29ddb..0e0a993 100644 --- a/drivers/dahdi/dahdi-sysfs.c +++ b/drivers/dahdi/dahdi-sysfs.c @@ -68,7 +68,7 @@ return err; \ } while (0) -static int span_uevent(struct device *dev, struct kobj_uevent_env *kenv) +static int span_uevent(UEVENT_CONST struct device *dev, struct kobj_uevent_env *kenv) { struct dahdi_span *span; @@ -438,7 +438,7 @@ return err; \ } while (0) -static int device_uevent(struct device *dev, struct kobj_uevent_env *kenv) +static int device_uevent(UEVENT_CONST struct device *dev, struct kobj_uevent_env *kenv) { struct dahdi_device *ddev; diff --git a/drivers/dahdi/xpp/xbus-sysfs.c b/drivers/dahdi/xpp/xbus-sysfs.c index d8c11dc..34cab65 100644 --- a/drivers/dahdi/xpp/xbus-sysfs.c +++ b/drivers/dahdi/xpp/xbus-sysfs.c @@ -418,7 +418,7 @@ return err; \ } while (0) -static int astribank_uevent(struct device *dev, struct kobj_uevent_env *kenv) +static int astribank_uevent(UEVENT_CONST struct device *dev, struct kobj_uevent_env *kenv) { xbus_t *xbus; extern char *initdir; diff --git a/include/dahdi/kernel.h b/include/dahdi/kernel.h index 778c2b2..f04f324 100644 --- a/include/dahdi/kernel.h +++ b/include/dahdi/kernel.h @@ -1683,4 +1683,13 @@ #endif /* DAHDI_PRINK_MACROS_USE_debug */ + +/* work-around kernel API change from "struct device *dev" to "const struct device *dev" + * as implemented in 2a81ada32f0e584fc0c943e0d3a8c9f4fae411d6 */ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0) +#define UEVENT_CONST const +#else +#define UEVENT_CONST +#endif + #endif /* _DAHDI_KERNEL_H */ -- To view, visit https://gerrit.osmocom.org/c/dahdi-linux/+/33184 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: dahdi-linux Gerrit-Branch: master Gerrit-Change-Id: I0c416d8fa8d7d0081fdfec6325971d6de9f8d239 Gerrit-Change-Number: 33184 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge@osmocom.org> Gerrit-MessageType: newchange
participants (1)
-
laforge