From: hartkopp Date: Sun, 18 Apr 2010 09:03:15 +0000 (+0000) Subject: The cleanup of slc_alloc() integrated in SVN Rev1095 based on upstream commit X-Git-Url: http://rtime.felk.cvut.cz/gitweb/socketcan-devel.git/commitdiff_plain/239be3a618c0ee5c59deb264f3b22873b4b07208 The cleanup of slc_alloc() integrated in SVN Rev1095 based on upstream commit 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 --- diff --git a/kernel/2.6/drivers/net/can/slcan.c b/kernel/2.6/drivers/net/can/slcan.c index 3cbb9b8..3a30a6b 100644 --- a/kernel/2.6/drivers/net/can/slcan.c +++ b/kernel/2.6/drivers/net/can/slcan.c @@ -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 */