Staging: comedi: amplc_pc236: Checkpatch cleanups
This fixes all checkpatch issues in the amplc_pc236 comedi driver. Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
669c930c8f
commit
9f7a344b69
|
@ -150,7 +150,8 @@ 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 */
|
||||
|
@ -345,10 +346,9 @@ 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;
|
||||
|
||||
/*
|
||||
|
@ -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");
|
||||
|
||||
|
@ -422,29 +421,26 @@ 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) {
|
||||
printk(KERN_INFO "comedi%d: %s removed\n",
|
||||
dev->minor, dev->board_name);
|
||||
|
|
Loading…
Reference in New Issue