]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
staging: vt6655: device_init_registers replace spin lock
authorMalcolm Priestley <tvboxspy@gmail.com>
Wed, 29 Oct 2014 17:44:04 +0000 (17:44 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Oct 2014 20:31:31 +0000 (13:31 -0700)
Use 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/vt6655/device_main.c

index d7dd002f8daf12446ac78cc95f7187f2625d0585..c5eca1075d3a9dfc9ad8739ef095ffd21288ae6e 100644 (file)
@@ -406,6 +406,7 @@ device_set_options(struct vnt_private *pDevice)
 
 static void device_init_registers(struct vnt_private *pDevice)
 {
+       unsigned long flags;
        unsigned int ii;
        unsigned char byValue;
        unsigned char byValue1;
@@ -439,11 +440,11 @@ static void device_init_registers(struct vnt_private *pDevice)
        /* Get Local ID */
        VNSvInPortB(pDevice->PortOffset + MAC_REG_LOCALID, &pDevice->byLocalID);
 
-       spin_lock_irq(&pDevice->lock);
+       spin_lock_irqsave(&pDevice->lock, flags);
 
        SROMvReadAllContents(pDevice->PortOffset, pDevice->abyEEPROM);
 
-       spin_unlock_irq(&pDevice->lock);
+       spin_unlock_irqrestore(&pDevice->lock, flags);
 
        /* Get Channel range */
        pDevice->byMinChannel = 1;