Commit f39b0e05 authored by Dave Jones's avatar Dave Jones Committed by Linus Torvalds

[PATCH] niccy region handling cleanups

parent 4fdb04b7
......@@ -258,16 +258,15 @@ setup_niccy(struct IsdnCard *card)
cs->hw.niccy.cfg_reg = 0;
cs->subtyp = NICCY_PNP;
cs->irq = card->para[0];
if (check_region((cs->hw.niccy.isac), 2)) {
if (!request_region(cs->hw.niccy.isac, 2, "niccy data")) {
printk(KERN_WARNING
"HiSax: %s data port %x-%x already in use\n",
CardType[card->typ],
cs->hw.niccy.isac,
cs->hw.niccy.isac + 1);
return (0);
} else
request_region(cs->hw.niccy.isac, 2, "niccy data");
if (check_region((cs->hw.niccy.isac_ale), 2)) {
}
if (!request_region(cs->hw.niccy.isac_ale, 2, "niccy addr")) {
printk(KERN_WARNING
"HiSax: %s address port %x-%x already in use\n",
CardType[card->typ],
......@@ -275,8 +274,7 @@ setup_niccy(struct IsdnCard *card)
cs->hw.niccy.isac_ale + 1);
release_region(cs->hw.niccy.isac, 2);
return (0);
} else
request_region(cs->hw.niccy.isac_ale, 2, "niccy addr");
}
} else {
#if CONFIG_PCI
u_int pci_ioaddr;
......@@ -315,16 +313,15 @@ setup_niccy(struct IsdnCard *card)
cs->hw.niccy.isac_ale = pci_ioaddr + ISAC_PCI_ADDR;
cs->hw.niccy.hscx = pci_ioaddr + HSCX_PCI_DATA;
cs->hw.niccy.hscx_ale = pci_ioaddr + HSCX_PCI_ADDR;
if (check_region((cs->hw.niccy.isac), 4)) {
if (!request_region(cs->hw.niccy.isac, 4, "niccy")) {
printk(KERN_WARNING
"HiSax: %s data port %x-%x already in use\n",
CardType[card->typ],
cs->hw.niccy.isac,
cs->hw.niccy.isac + 4);
return (0);
} else
request_region(cs->hw.niccy.isac, 4, "niccy");
if (check_region(cs->hw.niccy.cfg_reg, 0x40)) {
}
if (!request_region(cs->hw.niccy.cfg_reg, 0x40, "niccy pci")) {
printk(KERN_WARNING
"HiSax: %s pci port %x-%x already in use\n",
CardType[card->typ],
......@@ -332,8 +329,6 @@ setup_niccy(struct IsdnCard *card)
cs->hw.niccy.cfg_reg + 0x40);
release_region(cs->hw.niccy.isac, 4);
return (0);
} else {
request_region(cs->hw.niccy.cfg_reg, 0x40, "niccy pci");
}
#else
printk(KERN_WARNING "Niccy: io0 0 and NO_PCI_BIOS\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment