]> rtime.felk.cvut.cz Git - socketcan-devel.git/commitdiff
Fix some #if's since the change in sk_alloc() and addition of
authorthuermann <thuermann@030b6a49-0b11-0410-94ab-b0dab22257f2>
Thu, 19 Apr 2007 08:34:49 +0000 (08:34 +0000)
committerthuermann <thuermann@030b6a49-0b11-0410-94ab-b0dab22257f2>
Thu, 19 Apr 2007 08:34:49 +0000 (08:34 +0000)
proto_{un,}register() was in Linux-2.6.12, not 2.6.13.

git-svn-id: svn://svn.berlios.de//socketcan/trunk@222 030b6a49-0b11-0410-94ab-b0dab22257f2

kernel/2.6/include/linux/can/core.h
kernel/2.6/net/can/af_can.c
kernel/2.6/net/can/bcm.c
kernel/2.6/net/can/raw.c

index 291e4e592ace919673ac67b81d516436012bf823..e1a2e4c8e24a57c75fdf4d5f89d3d7a55df4148d 100644 (file)
@@ -45,7 +45,7 @@ struct can_proto {
        int              protocol;
        int              capability;
        struct proto_ops *ops;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12)
        struct proto     *prot;
 #else
        struct module    *owner;
index d30dcd3afa666d6e8d61971df37ff37413bf7919..1e4e1583f77eaeee37f61d2003c576ac9d87d189 100644 (file)
@@ -270,7 +270,7 @@ int can_proto_register(struct can_proto *cp)
                return -EBUSY;
        }
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12)
        err = proto_register(cp->prot, 0);
        if (err < 0)
                return err;
@@ -303,7 +303,7 @@ int can_proto_unregister(struct can_proto *cp)
                printk(KERN_ERR "CAN: protocol %d is not registered\n", proto);
                return -ESRCH;
        }
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12)
        proto_unregister(cp->prot);
 #endif
        proto_tab[proto] = NULL;
@@ -438,7 +438,7 @@ static int can_create(struct socket *sock, int protocol)
 
        sock->ops = cp->ops;
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12)
        sk = sk_alloc(PF_CAN, GFP_KERNEL, cp->prot, 1);
        if (!sk)
                return -ENOMEM;
@@ -462,7 +462,7 @@ static int can_create(struct socket *sock, int protocol)
 
        DBG("created sock: %p\n", sk);
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12)
        if (sk->sk_prot->init)
                ret = sk->sk_prot->init(sk);
 
index 68c99be0a271575265fc0a9dae8f6485ebf2a19f..a1ac530cf3c36823bbd186c96f36916acf1f78f0 100644 (file)
@@ -194,7 +194,7 @@ static struct proto_ops bcm_ops = {
 #define BCM_CAP CAP_NET_RAW
 #endif
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12)
 struct bcm_sock {
        struct sock    sk;
        struct bcm_opt opt;
index 49e9722e5e9a2944f7e6364a33fc0987689b8e48..afcd41e67ae0636a5b1a0121b0fdc30763abebf2 100644 (file)
@@ -152,7 +152,7 @@ struct raw_opt {
 
 #undef CAN_RAW_SUPPORT_REBIND /* allow bind on already bound socket */
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12)
 struct raw_sock {
        struct sock    sk;
        struct raw_opt opt;