Commit fb22d727 authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Russell King

[NET] am79c961a: fix spin_lock usage

spin_lock functions take a pointer to the lock, not the lock itself.
This error was noticed by compiling ebsa110_defconfig for linux-rt where
the locking functions obviously are more picky about their arguments.
Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Roel Kluin <12o3l@tiscali.nl>
Cc: Steven Rostedt <srostedt@redhat.com>
Cc: netdev@vger.kernel.org
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 0b23a0ef
...@@ -208,9 +208,9 @@ am79c961_init_for_open(struct net_device *dev) ...@@ -208,9 +208,9 @@ am79c961_init_for_open(struct net_device *dev)
/* /*
* Stop the chip. * Stop the chip.
*/ */
spin_lock_irqsave(priv->chip_lock, flags); spin_lock_irqsave(&priv->chip_lock, flags);
write_rreg (dev->base_addr, CSR0, CSR0_BABL|CSR0_CERR|CSR0_MISS|CSR0_MERR|CSR0_TINT|CSR0_RINT|CSR0_STOP); write_rreg (dev->base_addr, CSR0, CSR0_BABL|CSR0_CERR|CSR0_MISS|CSR0_MERR|CSR0_TINT|CSR0_RINT|CSR0_STOP);
spin_unlock_irqrestore(priv->chip_lock, flags); spin_unlock_irqrestore(&priv->chip_lock, flags);
write_ireg (dev->base_addr, 5, 0x00a0); /* Receive address LED */ write_ireg (dev->base_addr, 5, 0x00a0); /* Receive address LED */
write_ireg (dev->base_addr, 6, 0x0081); /* Collision LED */ write_ireg (dev->base_addr, 6, 0x0081); /* Collision LED */
...@@ -332,10 +332,10 @@ am79c961_close(struct net_device *dev) ...@@ -332,10 +332,10 @@ am79c961_close(struct net_device *dev)
netif_stop_queue(dev); netif_stop_queue(dev);
netif_carrier_off(dev); netif_carrier_off(dev);
spin_lock_irqsave(priv->chip_lock, flags); spin_lock_irqsave(&priv->chip_lock, flags);
write_rreg (dev->base_addr, CSR0, CSR0_STOP); write_rreg (dev->base_addr, CSR0, CSR0_STOP);
write_rreg (dev->base_addr, CSR3, CSR3_MASKALL); write_rreg (dev->base_addr, CSR3, CSR3_MASKALL);
spin_unlock_irqrestore(priv->chip_lock, flags); spin_unlock_irqrestore(&priv->chip_lock, flags);
free_irq (dev->irq, dev); free_irq (dev->irq, dev);
...@@ -391,7 +391,7 @@ static void am79c961_setmulticastlist (struct net_device *dev) ...@@ -391,7 +391,7 @@ static void am79c961_setmulticastlist (struct net_device *dev)
am79c961_mc_hash(dmi, multi_hash); am79c961_mc_hash(dmi, multi_hash);
} }
spin_lock_irqsave(priv->chip_lock, flags); spin_lock_irqsave(&priv->chip_lock, flags);
stopped = read_rreg(dev->base_addr, CSR0) & CSR0_STOP; stopped = read_rreg(dev->base_addr, CSR0) & CSR0_STOP;
...@@ -405,9 +405,9 @@ static void am79c961_setmulticastlist (struct net_device *dev) ...@@ -405,9 +405,9 @@ static void am79c961_setmulticastlist (struct net_device *dev)
* Spin waiting for chip to report suspend mode * Spin waiting for chip to report suspend mode
*/ */
while ((read_rreg(dev->base_addr, CTRL1) & CTRL1_SPND) == 0) { while ((read_rreg(dev->base_addr, CTRL1) & CTRL1_SPND) == 0) {
spin_unlock_irqrestore(priv->chip_lock, flags); spin_unlock_irqrestore(&priv->chip_lock, flags);
nop(); nop();
spin_lock_irqsave(priv->chip_lock, flags); spin_lock_irqsave(&priv->chip_lock, flags);
} }
} }
...@@ -429,7 +429,7 @@ static void am79c961_setmulticastlist (struct net_device *dev) ...@@ -429,7 +429,7 @@ static void am79c961_setmulticastlist (struct net_device *dev)
write_rreg(dev->base_addr, CTRL1, 0); write_rreg(dev->base_addr, CTRL1, 0);
} }
spin_unlock_irqrestore(priv->chip_lock, flags); spin_unlock_irqrestore(&priv->chip_lock, flags);
} }
static void am79c961_timeout(struct net_device *dev) static void am79c961_timeout(struct net_device *dev)
...@@ -467,10 +467,10 @@ am79c961_sendpacket(struct sk_buff *skb, struct net_device *dev) ...@@ -467,10 +467,10 @@ am79c961_sendpacket(struct sk_buff *skb, struct net_device *dev)
am_writeword (dev, hdraddr + 2, TMD_OWN|TMD_STP|TMD_ENP); am_writeword (dev, hdraddr + 2, TMD_OWN|TMD_STP|TMD_ENP);
priv->txhead = head; priv->txhead = head;
spin_lock_irqsave(priv->chip_lock, flags); spin_lock_irqsave(&priv->chip_lock, flags);
write_rreg (dev->base_addr, CSR0, CSR0_TDMD|CSR0_IENA); write_rreg (dev->base_addr, CSR0, CSR0_TDMD|CSR0_IENA);
dev->trans_start = jiffies; dev->trans_start = jiffies;
spin_unlock_irqrestore(priv->chip_lock, flags); spin_unlock_irqrestore(&priv->chip_lock, flags);
/* /*
* If the next packet is owned by the ethernet device, * If the next packet is owned by the ethernet device,
......
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