[PATCH 6/6] consolidate spin_lock/unlock waiting with spin_unlock_wait

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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)

CC: Florian Fainelli <florian@xxxxxxxxxxx>
Signed-off-by: Nicholas Mc Guire <der.herr@xxxxxxx>
---
 drivers/net/ethernet/ti/cpmac.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/ti/cpmac.c b/drivers/net/ethernet/ti/cpmac.c
index 2dc16b6..e62f812 100644
--- a/drivers/net/ethernet/ti/cpmac.c
+++ b/drivers/net/ethernet/ti/cpmac.c
@@ -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,
-- 
1.7.2.5

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux