summaryrefslogtreecommitdiffstats
path: root/drivers/net/cassini.c
diff options
context:
space:
mode:
authorfrançois romieu <romieu@fr.zoreil.com>2011-08-25 07:02:49 +0200
committerDavid S. Miller <davem@davemloft.net>2011-08-26 18:49:03 +0200
commit3d015565f316584139946a1c450d44209beefeb6 (patch)
treed5ad9ee208f6544864a5c6db0e4969fdf81c08e0 /drivers/net/cassini.c
parentcan: ti_hecc: Fix uninitialized spinlock in probe (diff)
downloadlinux-3d015565f316584139946a1c450d44209beefeb6.tar.xz
linux-3d015565f316584139946a1c450d44209beefeb6.zip
cassini: init before use in cas_interruptN.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Spotted-by: Thomas Jarosch <thomas.jarosch@intra2net.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--drivers/net/cassini.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/cassini.c b/drivers/net/cassini.c
index 646c86bcc545..fdb7a1756409 100644
--- a/drivers/net/cassini.c
+++ b/drivers/net/cassini.c
@@ -2452,14 +2452,13 @@ static irqreturn_t cas_interruptN(int irq, void *dev_id)
struct net_device *dev = dev_id;
struct cas *cp = netdev_priv(dev);
unsigned long flags;
- int ring;
+ int ring = (irq == cp->pci_irq_INTC) ? 2 : 3;
u32 status = readl(cp->regs + REG_PLUS_INTRN_STATUS(ring));
/* check for shared irq */
if (status == 0)
return IRQ_NONE;
- ring = (irq == cp->pci_irq_INTC) ? 2 : 3;
spin_lock_irqsave(&cp->lock, flags);
if (status & INTR_RX_DONE_ALT) { /* handle rx separately */
#ifdef USE_NAPI