aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/cs5530.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/pci/cs5530.c')
-rw-r--r--drivers/ide/pci/cs5530.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ide/pci/cs5530.c b/drivers/ide/pci/cs5530.c
index ef91e9d7c54f..804ecabbd65f 100644
--- a/drivers/ide/pci/cs5530.c
+++ b/drivers/ide/pci/cs5530.c
@@ -81,11 +81,11 @@ static void cs5530_set_pio_mode(ide_drive_t *drive, const u8 pio)
81static u8 cs5530_udma_filter(ide_drive_t *drive) 81static u8 cs5530_udma_filter(ide_drive_t *drive)
82{ 82{
83 ide_hwif_t *hwif = drive->hwif; 83 ide_hwif_t *hwif = drive->hwif;
84 ide_drive_t *mate = &hwif->drives[(drive->dn & 1) ^ 1]; 84 ide_drive_t *mate = ide_get_pair_dev(drive);
85 u16 *mateid = mate->id; 85 u16 *mateid = mate->id;
86 u8 mask = hwif->ultra_mask; 86 u8 mask = hwif->ultra_mask;
87 87
88 if (mate->present == 0) 88 if (mate == NULL)
89 goto out; 89 goto out;
90 90
91 if (ata_id_has_dma(mateid) && __ide_dma_bad_drive(mate) == 0) { 91 if (ata_id_has_dma(mateid) && __ide_dma_bad_drive(mate) == 0) {