diff options
Diffstat (limited to 'src/cyber_device_device_class.c')
| -rw-r--r-- | src/cyber_device_device_class.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cyber_device_device_class.c b/src/cyber_device_device_class.c index 98e9557..0ceeaac 100644 --- a/src/cyber_device_device_class.c +++ b/src/cyber_device_device_class.c @@ -22,6 +22,7 @@ #include <linux/kernel.h> #include <linux/module.h> #include <linux/string.h> +#include <linux/version.h> extern struct cyber_device device; @@ -37,7 +38,11 @@ static ssize_t storage_technology_show(struct class * class, struct class_attrib } static CLASS_ATTR_RO(storage_technology); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,2,0) +static int cyber_device_handle_uevent(struct device const * kernelDevice, struct kobj_uevent_env * environment) +#else static int cyber_device_handle_uevent(struct device * kernelDevice, struct kobj_uevent_env * environment) +#endif { add_uevent_var(environment, "DEVMODE=%#o", 0666); return 0; |
