Skip to content

Commit

Permalink
slcan: remove unused 'leased', 'line' and 'pid' fields from the 'slca…
Browse files Browse the repository at this point in the history
…n' structure

Signed-off-by: Matvejchikov Ilya <matvejchikov@gmail.com>
Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Matvejchikov Ilya authored and David S. Miller committed Jul 19, 2011
1 parent a9481a3 commit 7ad711b
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions drivers/net/can/slcan.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,6 @@ struct slcan {
unsigned long flags; /* Flag values/ mode etc */
#define SLF_INUSE 0 /* Channel in use */
#define SLF_ERROR 1 /* Parity, etc. error */

unsigned char leased;
dev_t line;
pid_t pid;
};

static struct net_device **slcan_devs;
Expand Down Expand Up @@ -446,7 +442,7 @@ static void slc_sync(void)
break;

sl = netdev_priv(dev);
if (sl->tty || sl->leased)
if (sl->tty)
continue;
if (dev->flags & IFF_UP)
dev_close(dev);
Expand Down Expand Up @@ -534,8 +530,6 @@ static int slcan_open(struct tty_struct *tty)

sl->tty = tty;
tty->disc_data = sl;
sl->line = tty_devnum(tty);
sl->pid = current->pid;

if (!test_bit(SLF_INUSE, &sl->flags)) {
/* Perform the low-level SLCAN initialization. */
Expand Down Expand Up @@ -586,8 +580,6 @@ static void slcan_close(struct tty_struct *tty)

tty->disc_data = NULL;
sl->tty = NULL;
if (!sl->leased)
sl->line = 0;

/* Flush network side */
unregister_netdev(sl->dev);
Expand Down

0 comments on commit 7ad711b

Please sign in to comment.