mirror of
https://gitlab.com/etherlab.org/ethercat.git
synced 2026-09-24 19:13:47 +08:00
Merge branch 'fix-6.4' into 'master'
Fix class_create on kernel 6.4 See merge request etherlab.org/ethercat!73
This commit is contained in:
@@ -71,7 +71,11 @@ static int __init ccat_class_init(struct ccat_class *base)
|
||||
return -1;
|
||||
}
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0)
|
||||
base->class = class_create(THIS_MODULE, base->name);
|
||||
#else
|
||||
base->class = class_create(base->name);
|
||||
#endif
|
||||
if (!base->class) {
|
||||
pr_warn("Create device class '%s' failed\n",
|
||||
base->name);
|
||||
|
||||
@@ -112,7 +112,11 @@ int __init ec_init_module(void)
|
||||
}
|
||||
}
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0)
|
||||
class = class_create(THIS_MODULE, "EtherCAT");
|
||||
#else
|
||||
class = class_create("EtherCAT");
|
||||
#endif
|
||||
if (IS_ERR(class)) {
|
||||
EC_ERR("Failed to create device class.\n");
|
||||
ret = PTR_ERR(class);
|
||||
|
||||
Reference in New Issue
Block a user