Skip to content

Commit 3a221d1

Browse files
AdrianBunkJeff Garzik
authored andcommitted
drivers/net/: remove write-only "last_dev"
This patch removes write-only global "last_dev" variables from the following drivers: - a2065.c - declance.c - sunlance.c Signed-off-by: Adrian Bunk <[email protected]> Signed-off-by: Jeff Garzik <[email protected]>
1 parent 909fa88 commit 3a221d1

File tree

3 files changed

+0
-12
lines changed

3 files changed

+0
-12
lines changed

drivers/net/a2065.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -475,16 +475,12 @@ static irqreturn_t lance_interrupt (int irq, void *dev_id)
475475
return IRQ_HANDLED;
476476
}
477477

478-
struct net_device *last_dev;
479-
480478
static int lance_open (struct net_device *dev)
481479
{
482480
struct lance_private *lp = netdev_priv(dev);
483481
volatile struct lance_regs *ll = lp->ll;
484482
int ret;
485483

486-
last_dev = dev;
487-
488484
/* Stop the Lance */
489485
ll->rap = LE_CSR0;
490486
ll->rdp = LE_C0_STOP;

drivers/net/declance.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -773,17 +773,13 @@ static irqreturn_t lance_interrupt(int irq, void *dev_id)
773773
return IRQ_HANDLED;
774774
}
775775

776-
struct net_device *last_dev = 0;
777-
778776
static int lance_open(struct net_device *dev)
779777
{
780778
volatile u16 *ib = (volatile u16 *)dev->mem_start;
781779
struct lance_private *lp = netdev_priv(dev);
782780
volatile struct lance_regs *ll = lp->ll;
783781
int status = 0;
784782

785-
last_dev = dev;
786-
787783
/* Stop the Lance */
788784
writereg(&ll->rap, LE_CSR0);
789785
writereg(&ll->rdp, LE_C0_STOP);

drivers/net/sunlance.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -915,15 +915,11 @@ static void build_fake_packet(struct lance_private *lp)
915915
lp->tx_new = TX_NEXT(entry);
916916
}
917917

918-
struct net_device *last_dev;
919-
920918
static int lance_open(struct net_device *dev)
921919
{
922920
struct lance_private *lp = netdev_priv(dev);
923921
int status = 0;
924922

925-
last_dev = dev;
926-
927923
STOP_LANCE(lp);
928924

929925
if (request_irq(dev->irq, &lance_interrupt, IRQF_SHARED,

0 commit comments

Comments
 (0)