diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-24 23:22:51 +0100 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-24 23:22:51 +0100 |
commit | f65dedfd7b75f19bde42bafbe84fddce18c42499 (patch) | |
tree | 51a853e59afbd785a78e963181ae9f66c5af7c8f /drivers | |
parent | 5bae8bf4508004d46487b3a18769d0ccff01c532 (diff) | |
download | op-kernel-dev-f65dedfd7b75f19bde42bafbe84fddce18c42499.zip op-kernel-dev-f65dedfd7b75f19bde42bafbe84fddce18c42499.tar.gz |
ide: use ide_pci_is_in_compatibility_mode() in ide_pci_init_{one,two}()
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ide/setup-pci.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/drivers/ide/setup-pci.c b/drivers/ide/setup-pci.c index fa645fc..79e3244 100644 --- a/drivers/ide/setup-pci.c +++ b/drivers/ide/setup-pci.c @@ -568,13 +568,11 @@ int ide_pci_init_one(struct pci_dev *dev, const struct ide_port_info *d, goto out; /* fixup IRQ */ - hw[1].irq = hw[0].irq = ret; - - if ((ret == 0 && (d->host_flags & IDE_HFLAG_LEGACY_IRQS)) || - (d->host_flags & IDE_HFLAG_FORCE_LEGACY_IRQS)) { + if (ide_pci_is_in_compatibility_mode(dev)) { hw[0].irq = pci_get_legacy_ide_irq(dev, 0); hw[1].irq = pci_get_legacy_ide_irq(dev, 1); - } + } else + hw[1].irq = hw[0].irq = ret; ret = ide_host_register(host, d, hws); if (ret) @@ -625,13 +623,11 @@ int ide_pci_init_two(struct pci_dev *dev1, struct pci_dev *dev2, goto out; /* fixup IRQ */ - hw[i*2 + 1].irq = hw[i*2].irq = ret; - - if ((ret == 0 && (d->host_flags & IDE_HFLAG_LEGACY_IRQS)) || - (d->host_flags & IDE_HFLAG_FORCE_LEGACY_IRQS)) { + if (ide_pci_is_in_compatibility_mode(pdev[i])) { hw[i*2].irq = pci_get_legacy_ide_irq(pdev[i], 0); hw[i*2 + 1].irq = pci_get_legacy_ide_irq(pdev[i], 1); - } + } else + hw[i*2 + 1].irq = hw[i*2].irq = ret; } ret = ide_host_register(host, d, hws); |