Skip to contentSkip to conversation

sgiioc4: always init hwif->io_ports

PATCH In review Bartlomiej Zolnierkiewicz 2 participants 2 messages Nov 18, 2007 – Nov 27, 2007 libata

lore
Share & tools
lore
#0 lore raw

PATCH 15/21 sgiioc4: always init hwif->io_ports

'if (hwif->io_ports[IDE_DATA_OFFSET] != cmd_base)' is always true.

---
 drivers/ide/pci/sgiioc4.c |   15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)
drivers/ide/pci/sgiioc4.c +6 -9
Index: b/drivers/ide/pci/sgiioc4.c
===================================================================
@@ -593,6 +593,7 @@ sgiioc4_ide_setup_pci_device(struct pci_
 	ide_hwif_t *hwif;
 	int h;
 	u8 idx[4] = { 0xff, 0xff, 0xff, 0xff };
+	hw_regs_t hw;
 
 	/*
 	 * Find an empty HWIF; if none available, return -ENOMEM.
@@ -632,15 +633,11 @@ sgiioc4_ide_setup_pci_device(struct pci_
 		return -ENOMEM;
 	}
 
-	if (hwif->io_ports[IDE_DATA_OFFSET] != cmd_base) {
-		hw_regs_t hw;
-
-		/* Initialize the IO registers */
-		memset(&hw, 0, sizeof(hw));
-		sgiioc4_init_hwif_ports(&hw, cmd_base, ctl, irqport);
-		memcpy(hwif->io_ports, hw.io_ports, sizeof(hwif->io_ports));
-		hwif->noprobe = !hwif->io_ports[IDE_DATA_OFFSET];
-	}
+	/* Initialize the IO registers */
+	memset(&hw, 0, sizeof(hw));
+	sgiioc4_init_hwif_ports(&hw, cmd_base, ctl, irqport);
+	memcpy(hwif->io_ports, hw.io_ports, sizeof(hwif->io_ports));
+	hwif->noprobe = 0;
 
 	hwif->irq = dev->irq;
 	hwif->chipset = ide_pci;