ide: use 'drive->dn & 1' instead of drive->select.b.unit

* Call ide_port_init_devices() in ide_host_register()
  also if 'struct ide_port_info *d' is not available.

* Init drive->dn in ide_port_init_devices() instead of
  ide_probe_port() so it is valid also in ->init_dev.

* Pass device number to ide_dev_apply_params().

* Use 'drive->dn & 1' instead of drive->select.b.unit.

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c
index 82fa610..d5934fc 100644
--- a/drivers/ide/ide-dma.c
+++ b/drivers/ide/ide-dma.c
@@ -370,7 +370,7 @@
 void ide_dma_host_set(ide_drive_t *drive, int on)
 {
 	ide_hwif_t *hwif	= HWIF(drive);
-	u8 unit			= (drive->select.b.unit & 0x01);
+	u8 unit			= drive->dn & 1;
 	u8 dma_stat		= hwif->tp_ops->read_sff_dma_status(hwif);
 
 	if (on)