diff -uNra a/drivers/dahdi/dahdi-sysfs.c b/drivers/dahdi/dahdi-sysfs.c --- a/drivers/dahdi/dahdi-sysfs.c 2023-02-02 18:10:37.000000000 +0800 +++ b/drivers/dahdi/dahdi-sysfs.c 2024-06-22 10:28:12.399040517 +0800 @@ -71,7 +71,11 @@ return err; \ } while (0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0) static int span_uevent(struct device *dev, char **envp, int num_envp, +#else +static int span_uevent(const struct device *dev, char **envp, int num_envp, +#endif char *buffer, int buffer_size) { struct dahdi_span *span; @@ -100,7 +104,11 @@ return err; \ } while (0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0) static int span_uevent(struct device *dev, struct kobj_uevent_env *kenv) +#else +static int span_uevent(const struct device *dev, struct kobj_uevent_env *kenv) +#endif { struct dahdi_span *span; @@ -342,7 +350,11 @@ .owner = THIS_MODULE }; +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0) static void span_uevent_send(struct dahdi_span *span, enum kobject_action act) +#else +static void span_uevent_send(const struct dahdi_span *span, enum kobject_action act) +#endif { struct kobject *kobj; @@ -475,7 +487,11 @@ return err; \ } while (0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0) static int device_uevent(struct device *dev, char **envp, int num_envp, +#else +static int device_uevent(const struct device *dev, char **envp, int num_envp, +#endif char *buffer, int buffer_size) { struct dahdi_device *ddev; @@ -503,7 +519,11 @@ return err; \ } while (0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0) static int device_uevent(struct device *dev, struct kobj_uevent_env *kenv) +#else +static int device_uevent(const struct device *dev, struct kobj_uevent_env *kenv) +#endif { struct dahdi_device *ddev; diff -uNra a/drivers/dahdi/xpp/xbus-sysfs.c b/drivers/dahdi/xpp/xbus-sysfs.c --- a/drivers/dahdi/xpp/xbus-sysfs.c 2023-02-02 18:10:37.000000000 +0800 +++ b/drivers/dahdi/xpp/xbus-sysfs.c 2024-06-22 10:28:12.407040514 +0800 @@ -424,8 +424,12 @@ return err; \ } while (0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0) static int astribank_uevent(struct device *dev, char **envp, int num_envp, +#else +static int astribank_uevent(const struct device *dev, char **envp, int num_envp, +#endif char *buffer, int buffer_size) { xbus_t *xbus; int i = 0; @@ -449,7 +454,11 @@ return err; \ } while (0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0) static int astribank_uevent(struct device *dev, struct kobj_uevent_env *kenv) +#else +static int astribank_uevent(const struct device *dev, struct kobj_uevent_env *kenv) +#endif { xbus_t *xbus; extern char *initdir;