diff options
Diffstat (limited to 'drivers/ide/ide-xfer-mode.c')
-rw-r--r-- | drivers/ide/ide-xfer-mode.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/ide/ide-xfer-mode.c b/drivers/ide/ide-xfer-mode.c index c2323869d92a..a62fb03fc1cc 100644 --- a/drivers/ide/ide-xfer-mode.c +++ b/drivers/ide/ide-xfer-mode.c | |||
@@ -136,7 +136,7 @@ int ide_set_pio_mode(ide_drive_t *drive, const u8 mode) | |||
136 | */ | 136 | */ |
137 | if (port_ops->set_dma_mode == NULL) { | 137 | if (port_ops->set_dma_mode == NULL) { |
138 | drive->pio_mode = mode; | 138 | drive->pio_mode = mode; |
139 | port_ops->set_pio_mode(drive, mode - XFER_PIO_0); | 139 | port_ops->set_pio_mode(hwif, drive); |
140 | return 0; | 140 | return 0; |
141 | } | 141 | } |
142 | 142 | ||
@@ -144,11 +144,11 @@ int ide_set_pio_mode(ide_drive_t *drive, const u8 mode) | |||
144 | if (ide_config_drive_speed(drive, mode)) | 144 | if (ide_config_drive_speed(drive, mode)) |
145 | return -1; | 145 | return -1; |
146 | drive->pio_mode = mode; | 146 | drive->pio_mode = mode; |
147 | port_ops->set_pio_mode(drive, mode - XFER_PIO_0); | 147 | port_ops->set_pio_mode(hwif, drive); |
148 | return 0; | 148 | return 0; |
149 | } else { | 149 | } else { |
150 | drive->pio_mode = mode; | 150 | drive->pio_mode = mode; |
151 | port_ops->set_pio_mode(drive, mode - XFER_PIO_0); | 151 | port_ops->set_pio_mode(hwif, drive); |
152 | return ide_config_drive_speed(drive, mode); | 152 | return ide_config_drive_speed(drive, mode); |
153 | } | 153 | } |
154 | } | 154 | } |