Skip to contentSkip to conversation

consolidate spin_lock/unlock waiting with spin_unlock_wait

PATCH New Nicholas Mc Guire 1 participant 1 message Dec 16, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 6/6 consolidate spin_lock/unlock waiting with spin_unlock_wait

cpmac.c:
consolidate spin_lock/unlock waiting with spin_unlock_wait()

config: ar7_defconfig (CONFIG_CPMAC=y)
toolchain: gcc-4.4-mips-linux-gnu (emdebian wheezy)

Builds cpmac.o with unrelated warnings.
drivers/net/ethernet/ti/cpmac.c: In function 'cpmac_start_xmit':
drivers/net/ethernet/ti/cpmac.c:570: warning: comparison of distinct pointer types lacks a cast drivers/net/ethernet/ti/cpmac.c:1243:2: warning: #warning FIXME: unhardcode gpio&reset bits No runtime tests (no hardware available)

---
 drivers/net/ethernet/ti/cpmac.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
drivers/net/ethernet/ti/cpmac.c +1 -2
index 2dc16b6..e62f812 100644
@@ -579,8 +579,7 @@ static int cpmac_start_xmit(struct sk_buff *skb, struct net_device *dev)
 		return NETDEV_TX_BUSY;
 	}
 
-	spin_lock(&priv->lock);
-	spin_unlock(&priv->lock);
+	spin_unlock_wait(&priv->lock);
 	desc->dataflags = CPMAC_SOP | CPMAC_EOP | CPMAC_OWN;
 	desc->skb = skb;
 	desc->data_mapping = dma_map_single(&dev->dev, skb->data, len,
Signature · 1 line
1.7.2.5