Commit 3a221d17 authored by Adrian Bunk's avatar Adrian Bunk Committed by Jeff Garzik

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: default avatarAdrian Bunk <bunk@kernel.org>
Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
parent 909fa882
...@@ -475,16 +475,12 @@ static irqreturn_t lance_interrupt (int irq, void *dev_id) ...@@ -475,16 +475,12 @@ static irqreturn_t lance_interrupt (int irq, void *dev_id)
return IRQ_HANDLED; return IRQ_HANDLED;
} }
struct net_device *last_dev;
static int lance_open (struct net_device *dev) static int lance_open (struct net_device *dev)
{ {
struct lance_private *lp = netdev_priv(dev); struct lance_private *lp = netdev_priv(dev);
volatile struct lance_regs *ll = lp->ll; volatile struct lance_regs *ll = lp->ll;
int ret; int ret;
last_dev = dev;
/* Stop the Lance */ /* Stop the Lance */
ll->rap = LE_CSR0; ll->rap = LE_CSR0;
ll->rdp = LE_C0_STOP; ll->rdp = LE_C0_STOP;
......
...@@ -773,8 +773,6 @@ static irqreturn_t lance_interrupt(int irq, void *dev_id) ...@@ -773,8 +773,6 @@ static irqreturn_t lance_interrupt(int irq, void *dev_id)
return IRQ_HANDLED; return IRQ_HANDLED;
} }
struct net_device *last_dev = 0;
static int lance_open(struct net_device *dev) static int lance_open(struct net_device *dev)
{ {
volatile u16 *ib = (volatile u16 *)dev->mem_start; volatile u16 *ib = (volatile u16 *)dev->mem_start;
...@@ -782,8 +780,6 @@ static int lance_open(struct net_device *dev) ...@@ -782,8 +780,6 @@ static int lance_open(struct net_device *dev)
volatile struct lance_regs *ll = lp->ll; volatile struct lance_regs *ll = lp->ll;
int status = 0; int status = 0;
last_dev = dev;
/* Stop the Lance */ /* Stop the Lance */
writereg(&ll->rap, LE_CSR0); writereg(&ll->rap, LE_CSR0);
writereg(&ll->rdp, LE_C0_STOP); writereg(&ll->rdp, LE_C0_STOP);
......
...@@ -915,15 +915,11 @@ static void build_fake_packet(struct lance_private *lp) ...@@ -915,15 +915,11 @@ static void build_fake_packet(struct lance_private *lp)
lp->tx_new = TX_NEXT(entry); lp->tx_new = TX_NEXT(entry);
} }
struct net_device *last_dev;
static int lance_open(struct net_device *dev) static int lance_open(struct net_device *dev)
{ {
struct lance_private *lp = netdev_priv(dev); struct lance_private *lp = netdev_priv(dev);
int status = 0; int status = 0;
last_dev = dev;
STOP_LANCE(lp); STOP_LANCE(lp);
if (request_irq(dev->irq, &lance_interrupt, IRQF_SHARED, if (request_irq(dev->irq, &lance_interrupt, IRQF_SHARED,
......
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