From cd956e65f376d8ab9734cdd3904745a56fccfb20 Mon Sep 17 00:00:00 2001 From: ppisa Date: Sat, 7 Jan 2006 22:09:47 +0000 Subject: [PATCH] Some minor updates to adapt sources for changes introduced in 2.6.15 kernel version. --- lincan/src/main.c | 4 ++++ lincan/src/pimx1.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lincan/src/main.c b/lincan/src/main.c index 1a868a7..c4fb22a 100644 --- a/lincan/src/main.c +++ b/lincan/src/main.c @@ -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{ diff --git a/lincan/src/pimx1.c b/lincan/src/pimx1.c index a24ddd8..1c1a303 100644 --- a/lincan/src/pimx1.c +++ b/lincan/src/pimx1.c @@ -11,7 +11,7 @@ #include "../include/can_sysdep.h" #include "../include/main.h" #include "../include/sja1000p.h" -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,14)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,14)) && defined(CONFIG_GENERIC_HARDIRQS) #include #endif /* <2.6.14 */ #include -- 2.39.2