aboutsummaryrefslogtreecommitdiff
path: root/drivers/ide
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-01-26 20:13:04 +0100
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-01-26 20:13:04 +0100
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 c446e348e29..bfcc8078b09 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)
}
}
-static int hwif_init(ide_hwif_t *hwif);
-static void hwif_register_devices(ide_hwif_t *hwif);
-
-static int probe_hwif_init(ide_hwif_t *hwif)
-{
- probe_hwif(hwif);
-
- if (!hwif_init(hwif)) {
- printk(KERN_INFO "%s: failed to initialize IDE interface\n",
- hwif->name);
- return -1;
- }
-
- if (hwif->present)
- hwif_register_devices(hwif);
-
- return 0;
-}
-
#if MAX_HWIFS > 1
/*
* save_match() is used to simplify logic in init_irq() below.
@@ -1394,11 +1375,26 @@ EXPORT_SYMBOL_GPL(ideprobe_init);
int ide_device_add(u8 idx[4])
{
+ ide_hwif_t *hwif;
int i, rc = 0;
for (i = 0; i < 4; i++) {
- if (idx[i] != 0xff)
- rc |= probe_hwif_init(&ide_hwifs[idx[i]]);
+ if (idx[i] == 0xff)
+ continue;
+
+ hwif = &ide_hwifs[idx[i]];
+
+ probe_hwif(hwif);
+
+ if (hwif_init(hwif) == 0) {
+ printk(KERN_INFO "%s: failed to initialize IDE "
+ "interface\n", hwif->name);
+ rc = -1;
+ continue;
+ }
+
+ if (hwif->present)
+ hwif_register_devices(hwif);
}
for (i = 0; i < 4; i++) {