aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-probe.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-04-26 16:25:18 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-04-26 16:25:18 -0400
commitd92f1a2829dbe29c644569a3b64a021e4d90005d (patch)
tree8390de547df80777f575f633d9a6d2512e4478db /drivers/ide/ide-probe.c
parentd9b819a025ca1b09dafbe90b5d25ba57a639f048 (diff)
ide: manage I/O resources in ide_legacy_init_one()
* Tell IDE layer to not manage resources by setting hwif->mmio flag. * Use {request,release}_region() for resources management. * Set ->name field of 'struct ide_port_info' instances in legacy VLB host drivers and use driver name for resources management. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-probe.c')
-rw-r--r--drivers/ide/ide-probe.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index e299c80c6a57..670d7f9ccf0e 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -1648,12 +1648,26 @@ static void ide_legacy_init_one(u8 *idx, hw_regs_t *hw, u8 port_no,
1648 irq = 15; 1648 irq = 15;
1649 } 1649 }
1650 1650
1651 if (!request_region(base, 8, d->name)) {
1652 printk(KERN_ERR "%s: I/O resource 0x%lX-0x%lX not free.\n",
1653 d->name, base, base + 7);
1654 return;
1655 }
1656
1657 if (!request_region(ctl, 1, d->name)) {
1658 printk(KERN_ERR "%s: I/O resource 0x%lX not free.\n",
1659 d->name, ctl);
1660 release_region(base, 8);
1661 return;
1662 }
1663
1651 ide_std_init_ports(hw, base, ctl); 1664 ide_std_init_ports(hw, base, ctl);
1652 hw->irq = irq; 1665 hw->irq = irq;
1653 1666
1654 hwif = ide_find_port_slot(d); 1667 hwif = ide_find_port_slot(d);
1655 if (hwif) { 1668 if (hwif) {
1656 ide_init_port_hw(hwif, hw); 1669 ide_init_port_hw(hwif, hw);
1670 hwif->mmio = 1;
1657 if (config) 1671 if (config)
1658 hwif->config_data = config; 1672 hwif->config_data = config;
1659 idx[port_no] = hwif->index; 1673 idx[port_no] = hwif->index;