diff options
Diffstat (limited to 'drivers/ide/ide-probe.c')
-rw-r--r-- | drivers/ide/ide-probe.c | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index c6ba439b1435..d5146c57e5b3 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c | |||
@@ -861,7 +861,7 @@ static void probe_hwif(ide_hwif_t *hwif) | |||
861 | static int hwif_init(ide_hwif_t *hwif); | 861 | static int hwif_init(ide_hwif_t *hwif); |
862 | static void hwif_register_devices(ide_hwif_t *hwif); | 862 | static void hwif_register_devices(ide_hwif_t *hwif); |
863 | 863 | ||
864 | int probe_hwif_init(ide_hwif_t *hwif) | 864 | static int probe_hwif_init(ide_hwif_t *hwif) |
865 | { | 865 | { |
866 | probe_hwif(hwif); | 866 | probe_hwif(hwif); |
867 | 867 | ||
@@ -877,8 +877,6 @@ int probe_hwif_init(ide_hwif_t *hwif) | |||
877 | return 0; | 877 | return 0; |
878 | } | 878 | } |
879 | 879 | ||
880 | EXPORT_SYMBOL(probe_hwif_init); | ||
881 | |||
882 | #if MAX_HWIFS > 1 | 880 | #if MAX_HWIFS > 1 |
883 | /* | 881 | /* |
884 | * save_match() is used to simplify logic in init_irq() below. | 882 | * save_match() is used to simplify logic in init_irq() below. |
@@ -1410,3 +1408,22 @@ int ideprobe_init (void) | |||
1410 | } | 1408 | } |
1411 | 1409 | ||
1412 | EXPORT_SYMBOL_GPL(ideprobe_init); | 1410 | EXPORT_SYMBOL_GPL(ideprobe_init); |
1411 | |||
1412 | int ide_device_add(u8 idx[4]) | ||
1413 | { | ||
1414 | int i, rc = 0; | ||
1415 | |||
1416 | for (i = 0; i < 4; i++) { | ||
1417 | if (idx[i] != 0xff) | ||
1418 | rc |= probe_hwif_init(&ide_hwifs[idx[i]]); | ||
1419 | } | ||
1420 | |||
1421 | for (i = 0; i < 4; i++) { | ||
1422 | if (idx[i] != 0xff) | ||
1423 | ide_proc_register_port(&ide_hwifs[idx[i]]); | ||
1424 | } | ||
1425 | |||
1426 | return rc; | ||
1427 | } | ||
1428 | |||
1429 | EXPORT_SYMBOL_GPL(ide_device_add); | ||