aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-01-26 14:13:04 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-01-26 14:13:04 -0500
commitba6560aa45fc498125b07130784ec5ca8a6922a6 (patch)
tree1ea529ba8ccba7c54890e499913ad3d700e04f29 /drivers/ide
parent795d74b51a853e1f5f2c81baf6666836a3866f08 (diff)
ide: kill probe_hwif_init()
There should be no functionality changes caused by this patch. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/ide-probe.c38
1 files changed, 17 insertions, 21 deletions
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index c446e348e29a..bfcc8078b092 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -848,25 +848,6 @@ static void probe_hwif(ide_hwif_t *hwif)
848 } 848 }
849} 849}
850 850
851static int hwif_init(ide_hwif_t *hwif);
852static void hwif_register_devices(ide_hwif_t *hwif);
853
854static int probe_hwif_init(ide_hwif_t *hwif)
855{
856 probe_hwif(hwif);
857
858 if (!hwif_init(hwif)) {
859 printk(KERN_INFO "%s: failed to initialize IDE interface\n",
860 hwif->name);
861 return -1;
862 }
863
864 if (hwif->present)
865 hwif_register_devices(hwif);
866
867 return 0;
868}
869
870#if MAX_HWIFS > 1 851#if MAX_HWIFS > 1
871/* 852/*
872 * save_match() is used to simplify logic in init_irq() below. 853 * save_match() is used to simplify logic in init_irq() below.
@@ -1394,11 +1375,26 @@ EXPORT_SYMBOL_GPL(ideprobe_init);
1394 1375
1395int ide_device_add(u8 idx[4]) 1376int ide_device_add(u8 idx[4])
1396{ 1377{
1378 ide_hwif_t *hwif;
1397 int i, rc = 0; 1379 int i, rc = 0;
1398 1380
1399 for (i = 0; i < 4; i++) { 1381 for (i = 0; i < 4; i++) {
1400 if (idx[i] != 0xff) 1382 if (idx[i] == 0xff)
1401 rc |= probe_hwif_init(&ide_hwifs[idx[i]]); 1383 continue;
1384
1385 hwif = &ide_hwifs[idx[i]];
1386
1387 probe_hwif(hwif);
1388
1389 if (hwif_init(hwif) == 0) {
1390 printk(KERN_INFO "%s: failed to initialize IDE "
1391 "interface\n", hwif->name);
1392 rc = -1;
1393 continue;
1394 }
1395
1396 if (hwif->present)
1397 hwif_register_devices(hwif);
1402 } 1398 }
1403 1399
1404 for (i = 0; i < 4; i++) { 1400 for (i = 0; i < 4; i++) {