aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/ide/pci/opti621.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/ide/pci/opti621.c b/drivers/ide/pci/opti621.c
index 8d28f335611b..8953d9c3926f 100644
--- a/drivers/ide/pci/opti621.c
+++ b/drivers/ide/pci/opti621.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/drivers/ide/pci/opti621.c Version 0.8 Aug 27, 2007 2 * linux/drivers/ide/pci/opti621.c Version 0.9 Sep 24, 2007
3 * 3 *
4 * Copyright (C) 1996-1998 Linus Torvalds & authors (see below) 4 * Copyright (C) 1996-1998 Linus Torvalds & authors (see below)
5 */ 5 */
@@ -133,6 +133,8 @@ static int reg_base;
133#define PIO_NOT_EXIST 254 133#define PIO_NOT_EXIST 254
134#define PIO_DONT_KNOW 255 134#define PIO_DONT_KNOW 255
135 135
136static DEFINE_SPINLOCK(opti621_lock);
137
136/* there are stored pio numbers from other calls of opti621_set_pio_mode */ 138/* there are stored pio numbers from other calls of opti621_set_pio_mode */
137static void compute_pios(ide_drive_t *drive, const u8 pio) 139static void compute_pios(ide_drive_t *drive, const u8 pio)
138/* Store values into drive->drive_data 140/* Store values into drive->drive_data
@@ -278,7 +280,7 @@ static void opti621_set_pio_mode(ide_drive_t *drive, const u8 pio)
278 second.recovery_time, drdy); 280 second.recovery_time, drdy);
279#endif 281#endif
280 282
281 spin_lock_irqsave(&ide_lock, flags); 283 spin_lock_irqsave(&opti621_lock, flags);
282 284
283 reg_base = hwif->io_ports[IDE_DATA_OFFSET]; 285 reg_base = hwif->io_ports[IDE_DATA_OFFSET];
284 286
@@ -317,7 +319,7 @@ static void opti621_set_pio_mode(ide_drive_t *drive, const u8 pio)
317 /* and read prefetch for both drives */ 319 /* and read prefetch for both drives */
318 write_reg(misc, MISC_REG); 320 write_reg(misc, MISC_REG);
319 321
320 spin_unlock_irqrestore(&ide_lock, flags); 322 spin_unlock_irqrestore(&opti621_lock, flags);
321} 323}
322 324
323/* 325/*