Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 186813
b: refs/heads/master
c: 9f7a344
h: refs/heads/master
i:
  186811: 9a7303a
v: v3
  • Loading branch information
Benjamin Adolphi authored and Greg Kroah-Hartman committed Mar 4, 2010
1 parent e46709e commit 8549751
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 26 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: 669c930c8fe266917865f923db51c3b654ab78a3
refs/heads/master: 9f7a344b69485dc1052534a4e1b2e5a8f7de086e
46 changes: 21 additions & 25 deletions trunk/drivers/staging/comedi/drivers/amplc_pc236.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,18 +78,18 @@ unused.
*/
/* Disable interrupt, also clear any interrupt there */
#define PCI236_INTR_DISABLE (PLX9052_INTCSR_LI1ENAB_DISABLED \
| PLX9052_INTCSR_LI1POL_HIGH \
| PLX9052_INTCSR_LI2POL_HIGH \
| PLX9052_INTCSR_PCIENAB_DISABLED \
| PLX9052_INTCSR_LI1SEL_EDGE \
| PLX9052_INTCSR_LI1CLRINT_ASSERTED)
| PLX9052_INTCSR_LI1POL_HIGH \
| PLX9052_INTCSR_LI2POL_HIGH \
| PLX9052_INTCSR_PCIENAB_DISABLED \
| PLX9052_INTCSR_LI1SEL_EDGE \
| PLX9052_INTCSR_LI1CLRINT_ASSERTED)
/* Enable interrupt, also clear any interrupt there. */
#define PCI236_INTR_ENABLE (PLX9052_INTCSR_LI1ENAB_ENABLED \
| PLX9052_INTCSR_LI1POL_HIGH \
| PLX9052_INTCSR_LI2POL_HIGH \
| PLX9052_INTCSR_PCIENAB_ENABLED \
| PLX9052_INTCSR_LI1SEL_EDGE \
| PLX9052_INTCSR_LI1CLRINT_ASSERTED)
| PLX9052_INTCSR_LI1POL_HIGH \
| PLX9052_INTCSR_LI2POL_HIGH \
| PLX9052_INTCSR_PCIENAB_ENABLED \
| PLX9052_INTCSR_LI1SEL_EDGE \
| PLX9052_INTCSR_LI1CLRINT_ASSERTED)

/*
* Board descriptions for Amplicon PC36AT and PCI236.
Expand Down Expand Up @@ -150,12 +150,13 @@ MODULE_DEVICE_TABLE(pci, pc236_pci_table);

/* this structure is for data unique to this hardware driver. If
several hardware drivers keep similar information in this structure,
feel free to suggest moving the variable to the struct comedi_device struct. */
feel free to suggest moving the variable to the struct comedi_device struct.
*/
struct pc236_private {
#ifdef CONFIG_COMEDI_PCI
/* PCI device */
struct pci_dev *pci_dev;
unsigned long lcr_iobase; /* PLX PCI9052 config registers in PCIBAR1 */
unsigned long lcr_iobase; /* PLX PCI9052 config registers in PCIBAR1 */
#endif
int enable_irq;
};
Expand Down Expand Up @@ -345,9 +346,8 @@ static int pc236_attach(struct comedi_device *dev, struct comedi_devconfig *it)
#endif
{
ret = pc236_request_region(dev->minor, iobase, PC236_IO_SIZE);
if (ret < 0) {
if (ret < 0)
return ret;
}
}
dev->iobase = iobase;

Expand Down Expand Up @@ -399,11 +399,10 @@ static int pc236_attach(struct comedi_device *dev, struct comedi_devconfig *it)
printk("(pci %s) ", pci_name(pci_dev));
#endif
}
if (irq) {
if (irq)
printk("(irq %u%s) ", irq, (dev->irq ? "" : " UNAVAILABLE"));
} else {
else
printk("(no irq) ");
}

printk("attached\n");

Expand All @@ -422,27 +421,24 @@ static int pc236_detach(struct comedi_device *dev)
{
printk(KERN_DEBUG "comedi%d: %s: detach\n", dev->minor,
PC236_DRIVER_NAME);
if (devpriv) {
if (devpriv)
pc236_intr_disable(dev);
}

if (dev->irq)
free_irq(dev->irq, dev);
if (dev->subdevices) {
if (dev->subdevices)
subdev_8255_cleanup(dev, dev->subdevices + 0);
}
if (devpriv) {
#ifdef CONFIG_COMEDI_PCI
if (devpriv->pci_dev) {
if (dev->iobase) {
if (dev->iobase)
comedi_pci_disable(devpriv->pci_dev);
}
pci_dev_put(devpriv->pci_dev);
} else
#endif
{
if (dev->iobase) {
if (dev->iobase)
release_region(dev->iobase, PC236_IO_SIZE);
}
}
}
if (dev->board_name) {
Expand Down

0 comments on commit 8549751

Please sign in to comment.