diff options
Diffstat (limited to 'drivers/ide/ide.c')
-rw-r--r-- | drivers/ide/ide.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c index bca6877ee6a5..41d042053548 100644 --- a/drivers/ide/ide.c +++ b/drivers/ide/ide.c | |||
@@ -74,9 +74,6 @@ static const u8 ide_hwif_to_major[] = { IDE0_MAJOR, IDE1_MAJOR, | |||
74 | 74 | ||
75 | DEFINE_MUTEX(ide_cfg_mtx); | 75 | DEFINE_MUTEX(ide_cfg_mtx); |
76 | 76 | ||
77 | __cacheline_aligned_in_smp DEFINE_SPINLOCK(ide_lock); | ||
78 | EXPORT_SYMBOL(ide_lock); | ||
79 | |||
80 | static void ide_port_init_devices_data(ide_hwif_t *); | 77 | static void ide_port_init_devices_data(ide_hwif_t *); |
81 | 78 | ||
82 | /* | 79 | /* |
@@ -333,6 +330,7 @@ static int set_pio_mode_abuse(ide_hwif_t *hwif, u8 req_pio) | |||
333 | static int set_pio_mode(ide_drive_t *drive, int arg) | 330 | static int set_pio_mode(ide_drive_t *drive, int arg) |
334 | { | 331 | { |
335 | ide_hwif_t *hwif = drive->hwif; | 332 | ide_hwif_t *hwif = drive->hwif; |
333 | ide_hwgroup_t *hwgroup = hwif->hwgroup; | ||
336 | const struct ide_port_ops *port_ops = hwif->port_ops; | 334 | const struct ide_port_ops *port_ops = hwif->port_ops; |
337 | 335 | ||
338 | if (arg < 0 || arg > 255) | 336 | if (arg < 0 || arg > 255) |
@@ -347,9 +345,9 @@ static int set_pio_mode(ide_drive_t *drive, int arg) | |||
347 | unsigned long flags; | 345 | unsigned long flags; |
348 | 346 | ||
349 | /* take lock for IDE_DFLAG_[NO_]UNMASK/[NO_]IO_32BIT */ | 347 | /* take lock for IDE_DFLAG_[NO_]UNMASK/[NO_]IO_32BIT */ |
350 | spin_lock_irqsave(&ide_lock, flags); | 348 | spin_lock_irqsave(&hwgroup->lock, flags); |
351 | port_ops->set_pio_mode(drive, arg); | 349 | port_ops->set_pio_mode(drive, arg); |
352 | spin_unlock_irqrestore(&ide_lock, flags); | 350 | spin_unlock_irqrestore(&hwgroup->lock, flags); |
353 | } else | 351 | } else |
354 | port_ops->set_pio_mode(drive, arg); | 352 | port_ops->set_pio_mode(drive, arg); |
355 | } else { | 353 | } else { |