Skip to contentSkip to conversation

ide: add hwif->chipset fixup to ide_device_add()

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

lore
Share & tools
lore
#0 lore raw

PATCH 13/21 ide: add hwif->chipset fixup to ide_device_add()

Add hwif->chipset fixup identical to the one in ideprobe_init() to ide_device_add().

---
 drivers/ide/ide-probe.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/ide/ide-probe.c +5 -1
Index: b/drivers/ide/ide-probe.c
===================================================================
@@ -1412,8 +1412,12 @@ int ide_device_add(u8 idx[4])
 
 		hwif = &ide_hwifs[idx[i]];
 
-		if (hwif->present)
+		if (hwif->present) {
+			if (hwif->chipset == ide_unknown ||
+			    hwif->chipset == ide_forced)
+				hwif->chipset = ide_generic;
 			hwif_register_devices(hwif);
+		}
 	}
 
 	for (i = 0; i < 4; i++) {