]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/ide/ide.c
ide: use 'drive->dn & 1' instead of drive->select.b.unit
[linux-2.6-omap-h63xx.git] / drivers / ide / ide.c
index 40b5a4614340c82b11ed9ea876a46a4435fd0c04..7624b937398a7c67f0474962ff5d048134b85dd1 100644 (file)
@@ -713,9 +713,9 @@ static int ide_set_disk_chs(const char *str, struct kernel_param *kp)
 module_param_call(chs, ide_set_disk_chs, NULL, NULL, 0);
 MODULE_PARM_DESC(chs, "force device as a disk (using CHS)");
 
-static void ide_dev_apply_params(ide_drive_t *drive)
+static void ide_dev_apply_params(ide_drive_t *drive, u8 unit)
 {
-       int i = drive->hwif->index * MAX_DRIVES + drive->select.b.unit;
+       int i = drive->hwif->index * MAX_DRIVES + unit;
 
        if (ide_nodma & (1 << i)) {
                printk(KERN_INFO "ide: disallowing DMA for %s\n", drive->name);
@@ -791,7 +791,7 @@ void ide_port_apply_params(ide_hwif_t *hwif)
        }
 
        for (i = 0; i < MAX_DRIVES; i++)
-               ide_dev_apply_params(&hwif->drives[i]);
+               ide_dev_apply_params(&hwif->drives[i], i);
 }
 
 /*