diff options
Diffstat (limited to 'drivers/ide/pci/opti621.c')
-rw-r--r-- | drivers/ide/pci/opti621.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ide/pci/opti621.c b/drivers/ide/pci/opti621.c index e28e672ddafc..e913da479808 100644 --- a/drivers/ide/pci/opti621.c +++ b/drivers/ide/pci/opti621.c | |||
@@ -137,7 +137,7 @@ static u8 read_reg(int reg) | |||
137 | static void opti621_set_pio_mode(ide_drive_t *drive, const u8 pio) | 137 | static void opti621_set_pio_mode(ide_drive_t *drive, const u8 pio) |
138 | { | 138 | { |
139 | ide_hwif_t *hwif = drive->hwif; | 139 | ide_hwif_t *hwif = drive->hwif; |
140 | ide_drive_t *pair = ide_get_paired_drive(drive); | 140 | ide_drive_t *pair = ide_get_pair_dev(drive); |
141 | unsigned long flags; | 141 | unsigned long flags; |
142 | u8 tim, misc, addr_pio = pio, clk; | 142 | u8 tim, misc, addr_pio = pio, clk; |
143 | 143 | ||
@@ -153,7 +153,7 @@ static void opti621_set_pio_mode(ide_drive_t *drive, const u8 pio) | |||
153 | 153 | ||
154 | drive->drive_data = XFER_PIO_0 + pio; | 154 | drive->drive_data = XFER_PIO_0 + pio; |
155 | 155 | ||
156 | if (pair->present) { | 156 | if (pair) { |
157 | if (pair->drive_data && pair->drive_data < drive->drive_data) | 157 | if (pair->drive_data && pair->drive_data < drive->drive_data) |
158 | addr_pio = pair->drive_data - XFER_PIO_0; | 158 | addr_pio = pair->drive_data - XFER_PIO_0; |
159 | } | 159 | } |