Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 82153
b: refs/heads/master
c: 4853565
h: refs/heads/master
i:
  82151: 5ac71ad
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Feb 1, 2008
1 parent 64c8981 commit 9e6cf29
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 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: c860a8f2d29b7da84fb3aed7b097f53c2c225fd6
refs/heads/master: 48535651f6a993924115768aa7256c371bf818e6
18 changes: 6 additions & 12 deletions trunk/drivers/ide/ide-probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -1245,28 +1245,21 @@ static int hwif_init(ide_hwif_t *hwif)
{
int old_irq;

/* Return success if no device is connected */
if (!hwif->present)
return 1;

if (!hwif->irq) {
if (!(hwif->irq = ide_default_irq(hwif->io_ports[IDE_DATA_OFFSET])))
{
printk("%s: DISABLED, NO IRQ\n", hwif->name);
return (hwif->present = 0);
return 0;
}
}
#ifdef CONFIG_BLK_DEV_HD
if (hwif->irq == HD_IRQ && hwif->io_ports[IDE_DATA_OFFSET] != HD_DATA) {
printk("%s: CANNOT SHARE IRQ WITH OLD "
"HARDDISK DRIVER (hd.c)\n", hwif->name);
return (hwif->present = 0);
return 0;
}
#endif /* CONFIG_BLK_DEV_HD */

/* we set it back to 1 if all is ok below */
hwif->present = 0;

if (register_blkdev(hwif->major, hwif->name))
return 0;

Expand Down Expand Up @@ -1305,10 +1298,7 @@ static int hwif_init(ide_hwif_t *hwif)

done:
init_gendisk(hwif);

ide_acpi_init(hwif);

hwif->present = 1; /* success */
return 1;

out:
Expand Down Expand Up @@ -1352,9 +1342,13 @@ int ide_device_add_all(u8 *idx)

hwif = &ide_hwifs[idx[i]];

if (!hwif->present)
continue;

if (hwif_init(hwif) == 0) {
printk(KERN_INFO "%s: failed to initialize IDE "
"interface\n", hwif->name);
hwif->present = 0;
rc = -1;
continue;
}
Expand Down

0 comments on commit 9e6cf29

Please sign in to comment.