From: Jiri Slaby Date: Wed, 4 Nov 2009 16:37:31 +0000 (-0800) Subject: NET: sungem, use spin_trylock_irqsave X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b8883a65be2d925ea82b14ca0068ce9a6c8bac1f;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git NET: sungem, use spin_trylock_irqsave Use spin_trylock_irqsave instead of open-coded local_irq_save+spin_trylock. Signed-off-by: Jiri Slaby Signed-off-by: David S. Miller --- 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, (csum_stuff_off << 21)); } - local_irq_save(flags); - if (!spin_trylock(&gp->tx_lock)) { + if (!spin_trylock_irqsave(&gp->tx_lock, flags)) { /* Tell upper layer to requeue */ - local_irq_restore(flags); return NETDEV_TX_LOCKED; } /* We raced with gem_do_stop() */