Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 77246
b: refs/heads/master
c: ba6560a
h: refs/heads/master
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Jan 26, 2008
1 parent 17f0f63 commit 90ea322
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 22 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 795d74b51a853e1f5f2c81baf6666836a3866f08
refs/heads/master: ba6560aa45fc498125b07130784ec5ca8a6922a6
38 changes: 17 additions & 21 deletions trunk/drivers/ide/ide-probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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++) {
Expand Down

0 comments on commit 90ea322

Please sign in to comment.