]> rtime.felk.cvut.cz Git - socketcan-devel.git/commitdiff
slcan: This commit reverts commit rev1171 that has been done to
authorhartkopp <hartkopp@030b6a49-0b11-0410-94ab-b0dab22257f2>
Thu, 18 Nov 2010 20:19:23 +0000 (20:19 +0000)
committerhartkopp <hartkopp@030b6a49-0b11-0410-94ab-b0dab22257f2>
Thu, 18 Nov 2010 20:19:23 +0000 (20:19 +0000)
enable the swtc char hack. Once swtc has gone the upstream commit
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=5342b77c4123ba39f911d92a813295fb3bb21f69
is restored now to his original extend.

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

kernel/2.6/drivers/net/can/slcan.c

index 337dd4306a1d6309b71c751153f10dc6ecb464e8..d82da6b4790b61960f3a0c397254803e7bcf6624 100644 (file)
@@ -609,8 +609,10 @@ static void slc_sync(void)
 static struct slcan *slc_alloc(dev_t line)
 {
        int i;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32)
        int sel = -1;
        int score = -1;
+#endif
        struct net_device *dev = NULL;
        struct slcan       *sl;
 
@@ -622,6 +624,7 @@ static struct slcan *slc_alloc(dev_t line)
                if (dev == NULL)
                        break;
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32)
                sl = netdev_priv(dev);
                if (sl->leased) {
                        if (sl->line != line)
@@ -668,6 +671,7 @@ static struct slcan *slc_alloc(dev_t line)
                        sl->flags &= (1 << SLF_INUSE);
                        return sl;
                }
+#endif
        }
 
        /* Sorry, too many, all slots in use */