cs5530: remove needless ide_lock taking
PATCH 9/15 cs5530: remove needless ide_lock taking
--- drivers/ide/pci/cs5530.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)
drivers/ide/pci/cs5530.c +1 -7
@@ -1,5 +1,5 @@/* -* linux/drivers/ide/pci/cs5530.c Version 0.76 Aug 3 2007 +* linux/drivers/ide/pci/cs5530.c Version 0.77 Sep 24 2007 * * Copyright (C) 2000 Andre Hedrick <[email protected]> * Copyright (C) 2000 Mark Lord <[email protected]>
@@ -146,7 +146,6 @@ static void cs5530_set_dma_mode(ide_drivstatic unsigned int __devinit init_chipset_cs5530 (struct pci_dev *dev,const char *name) {struct pci_dev *master_0 =NULL , *cs5530_0 =NULL ; -unsigned long flags;if (pci_resource_start (dev,4 ) ==0 )return -EFAULT ;
@@ -171,9 +170,6 @@ static unsigned int __devinit init_chips goto out; } -spin_lock_irqsave (&ide_lock, flags); -/* all CPUs (there should only be one CPU with this chipset) */ -/* * Enable BusMaster and MemoryWriteAndInvalidate for the cs5530: * --> OR 0x14 into 16-bit PCI COMMAND reg of function 0 of the cs5530
@@ -224,8 +220,6 @@ static unsigned int __devinit init_chipspci_write_config_byte (master_0,0x42 ,0x00 );pci_write_config_byte (master_0,0x43 ,0xc1 ); -spin_unlock_irqrestore (&ide_lock, flags); - out:pci_dev_put (master_0);pci_dev_put (cs5530_0);
Quoted 1 line · Bartlomiej Zolnierkiewicz
Signed-off-by Bartlomiej Zolnierkiewicz <[email protected]>
MBR, Sergei
Alan Cox
NAKdrivers/ide/pci/cs5530.c static unsigned int __devinit init_chips · line 176
Quoted 3 lines
drivers/ide/pci/cs5530.c +0
-3-spin_lock_irqsave (&ide_lock, flags); -/* all CPUs (there should only be one CPU with this chipset) */ -
NAK
What about pre-emptible kernels. Put in a private lock.
Alan
Quoted 7 lines · Alan Cox
drivers/ide/pci/cs5530.c static unsigned int __devinit init_chips · line 176
Quoted 3 lines
drivers/ide/pci/cs5530.c +0
-3-spin_lock_irqsave (&ide_lock, flags); -/* all CPUs (there should only be one CPU with this chipset) */ -NAK
What about pre-emptible kernels. Put in a private lock.
All the removed code resided in init_chipset_cs5530() which is called only during the controller initialization. Moreover pata_cs5530 also don't have any locking in cs5530_init_chip().
Bart
Quoted 3 lines
All the removed code resided in
init_chipset_cs5530()which is called only during the controller initialization. Moreoverpata_cs5530also don't have any locking incs5530_init_chip().
Fair enough, and I haven't found a reason for the locking being needed from doc reviews (hence its not in libata).