Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 40014
b: refs/heads/master
c: fca4edb
h: refs/heads/master
v: v3
  • Loading branch information
Amol Lad authored and Linus Torvalds committed Oct 20, 2006
1 parent 60fd09f commit 08876fd
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 4 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: 6220ec7844fda2686496013a66b5b9169976b991
refs/heads/master: fca4edb48b693d9df7de4c42d91b4158d8b7e347
26 changes: 24 additions & 2 deletions trunk/drivers/isdn/hisax/diva.c
Original file line number Diff line number Diff line change
Expand Up @@ -716,8 +716,10 @@ release_io_diva(struct IsdnCardState *cs)

*cfg = 0; /* disable INT0/1 */
*cfg = 2; /* reset pending INT0 */
iounmap((void *)cs->hw.diva.cfg_reg);
iounmap((void *)cs->hw.diva.pci_cfg);
if (cs->hw.diva.cfg_reg)
iounmap((void *)cs->hw.diva.cfg_reg);
if (cs->hw.diva.pci_cfg)
iounmap((void *)cs->hw.diva.pci_cfg);
return;
} else if (cs->subtyp != DIVA_IPAC_ISA) {
del_timer(&cs->hw.diva.tl);
Expand All @@ -733,6 +735,23 @@ release_io_diva(struct IsdnCardState *cs)
}
}

static void
iounmap_diva(struct IsdnCardState *cs)
{
if ((cs->subtyp == DIVA_IPAC_PCI) || (cs->subtyp == DIVA_IPACX_PCI)) {
if (cs->hw.diva.cfg_reg) {
iounmap((void *)cs->hw.diva.cfg_reg);
cs->hw.diva.cfg_reg = 0;
}
if (cs->hw.diva.pci_cfg) {
iounmap((void *)cs->hw.diva.pci_cfg);
cs->hw.diva.pci_cfg = 0;
}
}

return;
}

static void
reset_diva(struct IsdnCardState *cs)
{
Expand Down Expand Up @@ -1069,11 +1088,13 @@ setup_diva(struct IsdnCard *card)

if (!cs->irq) {
printk(KERN_WARNING "Diva: No IRQ for PCI card found\n");
iounmap_diva(cs);
return(0);
}

if (!cs->hw.diva.cfg_reg) {
printk(KERN_WARNING "Diva: No IO-Adr for PCI card found\n");
iounmap_diva(cs);
return(0);
}
cs->irq_flags |= IRQF_SHARED;
Expand Down Expand Up @@ -1123,6 +1144,7 @@ setup_diva(struct IsdnCard *card)
CardType[card->typ],
cs->hw.diva.cfg_reg,
cs->hw.diva.cfg_reg + bytecnt);
iounmap_diva(cs);
return (0);
}
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/isdn/hysdn/boardergo.c
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ ergo_releasehardware(hysdn_card * card)
free_irq(card->irq, card); /* release interrupt */
release_region(card->iobase + PCI9050_INTR_REG, 1); /* release all io ports */
release_region(card->iobase + PCI9050_USER_IO, 1);
vfree(card->dpram);
iounmap(card->dpram);
card->dpram = NULL; /* release shared mem */
} /* ergo_releasehardware */

Expand Down

0 comments on commit 08876fd

Please sign in to comment.