staging: vt6655: device_init_registers replace spin lock

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>
This commit is contained in:
Malcolm Priestley 2014-10-29 17:44:04 +00:00 committed by Greg Kroah-Hartman
parent f038ad0e72
commit 10d6f1b743
1 changed files with 3 additions and 2 deletions

View File

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