aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-probe.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/ide-probe.c')
-rw-r--r--drivers/ide/ide-probe.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index 3cebed77f55d..41bfa4d21ab6 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -717,7 +717,7 @@ EXPORT_SYMBOL_GPL(ide_undecoded_slave);
717 * This routine only knows how to look for drive units 0 and 1 717 * This routine only knows how to look for drive units 0 and 1
718 * on an interface, so any setting of MAX_DRIVES > 2 won't work here. 718 * on an interface, so any setting of MAX_DRIVES > 2 won't work here.
719 */ 719 */
720static void probe_hwif(ide_hwif_t *hwif) 720static void probe_hwif(ide_hwif_t *hwif, void (*fixup)(ide_hwif_t *hwif))
721{ 721{
722 unsigned int unit; 722 unsigned int unit;
723 unsigned long flags; 723 unsigned long flags;
@@ -820,6 +820,9 @@ static void probe_hwif(ide_hwif_t *hwif)
820 return; 820 return;
821 } 821 }
822 822
823 if (fixup)
824 fixup(hwif);
825
823 for (unit = 0; unit < MAX_DRIVES; ++unit) { 826 for (unit = 0; unit < MAX_DRIVES; ++unit) {
824 ide_drive_t *drive = &hwif->drives[unit]; 827 ide_drive_t *drive = &hwif->drives[unit];
825 828
@@ -874,10 +877,7 @@ static int hwif_init(ide_hwif_t *hwif);
874 877
875int probe_hwif_init_with_fixup(ide_hwif_t *hwif, void (*fixup)(ide_hwif_t *hwif)) 878int probe_hwif_init_with_fixup(ide_hwif_t *hwif, void (*fixup)(ide_hwif_t *hwif))
876{ 879{
877 probe_hwif(hwif); 880 probe_hwif(hwif, fixup);
878
879 if (fixup)
880 fixup(hwif);
881 881
882 if (!hwif_init(hwif)) { 882 if (!hwif_init(hwif)) {
883 printk(KERN_INFO "%s: failed to initialize IDE interface\n", 883 printk(KERN_INFO "%s: failed to initialize IDE interface\n",
@@ -1404,7 +1404,7 @@ int ideprobe_init (void)
1404 1404
1405 for (index = 0; index < MAX_HWIFS; ++index) 1405 for (index = 0; index < MAX_HWIFS; ++index)
1406 if (probe[index]) 1406 if (probe[index])
1407 probe_hwif(&ide_hwifs[index]); 1407 probe_hwif(&ide_hwifs[index], NULL);
1408 for (index = 0; index < MAX_HWIFS; ++index) 1408 for (index = 0; index < MAX_HWIFS; ++index)
1409 if (probe[index]) 1409 if (probe[index])
1410 hwif_init(&ide_hwifs[index]); 1410 hwif_init(&ide_hwifs[index]);