aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2009-11-04 11:37:31 -0500
committerDavid S. Miller <davem@davemloft.net>2009-11-04 11:37:31 -0500
commitb8883a65be2d925ea82b14ca0068ce9a6c8bac1f (patch)
treec36af0ecc39847845ee99e2ce8b75acc0386cefc /drivers
parentc6d14c84566d6b70ad9dc1618db0dec87cca9300 (diff)
NET: sungem, use spin_trylock_irqsave
Use spin_trylock_irqsave instead of open-coded local_irq_save+spin_trylock. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/sungem.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/sungem.c b/drivers/net/sungem.c
index 305ec3d783db..d6f4faf5bbcb 100644
--- a/drivers/net/sungem.c
+++ b/drivers/net/sungem.c
@@ -1033,10 +1033,8 @@ static netdev_tx_t gem_start_xmit(struct sk_buff *skb,
1033 (csum_stuff_off << 21)); 1033 (csum_stuff_off << 21));
1034 } 1034 }
1035 1035
1036 local_irq_save(flags); 1036 if (!spin_trylock_irqsave(&gp->tx_lock, flags)) {
1037 if (!spin_trylock(&gp->tx_lock)) {
1038 /* Tell upper layer to requeue */ 1037 /* Tell upper layer to requeue */
1039 local_irq_restore(flags);
1040 return NETDEV_TX_LOCKED; 1038 return NETDEV_TX_LOCKED;
1041 } 1039 }
1042 /* We raced with gem_do_stop() */ 1040 /* We raced with gem_do_stop() */