]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
staging: vt6656: lock changes device_xmit
authorMalcolm Priestley <tvboxspy@gmail.com>
Thu, 15 May 2014 21:49:21 +0000 (22:49 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 May 2014 22:02:20 +0000 (15:02 -0700)
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>
drivers/staging/vt6656/main_usb.c

index 14e649a66beba82165fb3b425cb5635777ba45ba..462f95ddd979b7eae6efba9db00ec1487eb49e99 100644 (file)
@@ -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;
 }