]> rtime.felk.cvut.cz Git - lincan.git/blobdiff - lincan/src/main.c
Some minor updates to adapt sources for changes introduced in 2.6.15 kernel version.
[lincan.git] / lincan / src / main.c
index 1a868a72996e7770c0ede4819ba1814cdc93d280..c4fb22ab2ef7db39c5a3b0c51aa4873a09b76264 100644 (file)
@@ -308,7 +308,11 @@ int init_module(void)
                                S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP,
                                &can_fops, (void*)objects_p[i]);
                    #else
+                     #if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,14))
                        this_dev=class_device_create(can_class, MKDEV(major, dev_minor), NULL,  "can%d", dev_minor);
+                     #else /* >= 2.6.15 */
+                       this_dev=class_device_create(can_class, NULL, MKDEV(major, dev_minor), NULL,  "can%d", dev_minor);
+                     #endif /* >= 2.6.15 */
                        if(!this_dev){
                                CANMSG("problem to create device \"can%d\" in the class \"can\"\n", dev_minor);
                        }else{