summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMalcolm Priestley <tvboxspy@gmail.com>2014-05-15 22:49:21 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-05-15 15:02:20 -0700
commit3c647642f6658c693d090b12c1b5bf901f3b7440 (patch)
treef7965a607d13cd1a2d03a2ea075719492bc182eb /drivers
parent29b02373f44d0d873a4f645b53c3cddce2f40f7b (diff)
downloadlinux-3c647642f6658c693d090b12c1b5bf901f3b7440.tar.gz
linux-3c647642f6658c693d090b12c1b5bf901f3b7440.tar.bz2
linux-3c647642f6658c693d090b12c1b5bf901f3b7440.zip
staging: vt6656: lock changes device_xmit
Replace locks with the spin_lock_irqsave and spin_unlock_irqrestore Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/vt6656/main_usb.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index 14e649a66beb..462f95ddd979 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -1159,8 +1159,9 @@ static int device_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct vnt_private *pDevice = netdev_priv(dev);
struct net_device_stats *stats = &pDevice->stats;
+ unsigned long flags;
- spin_lock_irq(&pDevice->lock);
+ spin_lock_irqsave(&pDevice->lock, flags);
netif_stop_queue(dev);
@@ -1181,7 +1182,7 @@ static int device_xmit(struct sk_buff *skb, struct net_device *dev)
}
out:
- spin_unlock_irq(&pDevice->lock);
+ spin_unlock_irqrestore(&pDevice->lock, flags);
return NETDEV_TX_OK;
}