Commit 7ad711b4 authored by Matvejchikov Ilya's avatar Matvejchikov Ilya Committed by David S. Miller

slcan: remove unused 'leased', 'line' and 'pid' fields from the 'slcan' structure

Signed-off-by: default avatarMatvejchikov Ilya <matvejchikov@gmail.com>
Acked-by: default avatarOliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a9481a38
...@@ -96,10 +96,6 @@ struct slcan { ...@@ -96,10 +96,6 @@ struct slcan {
unsigned long flags; /* Flag values/ mode etc */ unsigned long flags; /* Flag values/ mode etc */
#define SLF_INUSE 0 /* Channel in use */ #define SLF_INUSE 0 /* Channel in use */
#define SLF_ERROR 1 /* Parity, etc. error */ #define SLF_ERROR 1 /* Parity, etc. error */
unsigned char leased;
dev_t line;
pid_t pid;
}; };
static struct net_device **slcan_devs; static struct net_device **slcan_devs;
...@@ -446,7 +442,7 @@ static void slc_sync(void) ...@@ -446,7 +442,7 @@ static void slc_sync(void)
break; break;
sl = netdev_priv(dev); sl = netdev_priv(dev);
if (sl->tty || sl->leased) if (sl->tty)
continue; continue;
if (dev->flags & IFF_UP) if (dev->flags & IFF_UP)
dev_close(dev); dev_close(dev);
...@@ -534,8 +530,6 @@ static int slcan_open(struct tty_struct *tty) ...@@ -534,8 +530,6 @@ static int slcan_open(struct tty_struct *tty)
sl->tty = tty; sl->tty = tty;
tty->disc_data = sl; tty->disc_data = sl;
sl->line = tty_devnum(tty);
sl->pid = current->pid;
if (!test_bit(SLF_INUSE, &sl->flags)) { if (!test_bit(SLF_INUSE, &sl->flags)) {
/* Perform the low-level SLCAN initialization. */ /* Perform the low-level SLCAN initialization. */
...@@ -586,8 +580,6 @@ static void slcan_close(struct tty_struct *tty) ...@@ -586,8 +580,6 @@ static void slcan_close(struct tty_struct *tty)
tty->disc_data = NULL; tty->disc_data = NULL;
sl->tty = NULL; sl->tty = NULL;
if (!sl->leased)
sl->line = 0;
/* Flush network side */ /* Flush network side */
unregister_netdev(sl->dev); unregister_netdev(sl->dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment