diff options
Diffstat (limited to 'drivers/ide/scc_pata.c')
-rw-r--r-- | drivers/ide/scc_pata.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/ide/scc_pata.c b/drivers/ide/scc_pata.c index 90574ab76345..841164d7d3b9 100644 --- a/drivers/ide/scc_pata.c +++ b/drivers/ide/scc_pata.c | |||
@@ -259,7 +259,7 @@ static void scc_set_dma_mode(ide_drive_t *drive, const u8 speed) | |||
259 | unsigned long scrcst_port = ctl_base + 0x014; | 259 | unsigned long scrcst_port = ctl_base + 0x014; |
260 | unsigned long udenvt_port = ctl_base + 0x018; | 260 | unsigned long udenvt_port = ctl_base + 0x018; |
261 | unsigned long tdvhsel_port = ctl_base + 0x020; | 261 | unsigned long tdvhsel_port = ctl_base + 0x020; |
262 | int is_slave = (&hwif->drives[1] == drive); | 262 | int is_slave = drive->dn & 1; |
263 | int offset, idx; | 263 | int offset, idx; |
264 | unsigned long reg; | 264 | unsigned long reg; |
265 | unsigned long jcactsel; | 265 | unsigned long jcactsel; |
@@ -413,7 +413,8 @@ static int scc_dma_end(ide_drive_t *drive) | |||
413 | if (rq) | 413 | if (rq) |
414 | rq->errors |= ERROR_RESET; | 414 | rq->errors |= ERROR_RESET; |
415 | for (unit = 0; unit < MAX_DRIVES; unit++) { | 415 | for (unit = 0; unit < MAX_DRIVES; unit++) { |
416 | ide_drive_t *drive = &hwif->drives[unit]; | 416 | ide_drive_t *drive = hwif->devices[unit]; |
417 | |||
417 | drive->crc_count++; | 418 | drive->crc_count++; |
418 | } | 419 | } |
419 | } | 420 | } |