]> rtime.felk.cvut.cz Git - socketcan-devel.git/commitdiff
The cleanup of slc_alloc() integrated in SVN Rev1095 based on upstream commit
authorhartkopp <hartkopp@030b6a49-0b11-0410-94ab-b0dab22257f2>
Sun, 18 Apr 2010 09:03:15 +0000 (09:03 +0000)
committerhartkopp <hartkopp@030b6a49-0b11-0410-94ab-b0dab22257f2>
Sun, 18 Apr 2010 09:03:15 +0000 (09:03 +0000)
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=5342b77c4123ba39f911d92a813295fb3bb21f69
was not really Kernel-version depended ...

So far this code section is needed for the changes added in SVN Rev1170 so we
would need to revisit this code when mainlining the driver.

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

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

index 3cbb9b80b1a16191c139f8755065bf36cd4c0fbc..3a30a6b67d2a917cd776320bef1fa430fc4f84b2 100644 (file)
@@ -626,10 +626,8 @@ static void slc_sync(void)
 static struct slcan *slc_alloc(dev_t line, char forcednum)
 {
        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;
 
@@ -641,7 +639,6 @@ static struct slcan *slc_alloc(dev_t line, char forcednum)
                if (dev == NULL)
                        break;
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32)
                sl = netdev_priv(dev);
                if (sl->leased) {
                        if (sl->line != line)
@@ -696,7 +693,6 @@ static struct slcan *slc_alloc(dev_t line, char forcednum)
                        sl->flags &= (1 << SLF_INUSE);
                        return sl;
                }
-#endif
        }
 
        /* Sorry, too many, all slots in use */