diff options
author | Benjamin Adolphi <b.adolphi@googlemail.com> | 2010-02-21 15:51:00 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-03-03 19:43:03 -0500 |
commit | 9f7a344b69485dc1052534a4e1b2e5a8f7de086e (patch) | |
tree | 26c2ab6494a0b6cbd1923af87c5f049a9ea2383b | |
parent | 669c930c8fe266917865f923db51c3b654ab78a3 (diff) |
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>
-rw-r--r-- | drivers/staging/comedi/drivers/amplc_pc236.c | 46 |
1 files changed, 21 insertions, 25 deletions
diff --git a/drivers/staging/comedi/drivers/amplc_pc236.c b/drivers/staging/comedi/drivers/amplc_pc236.c index 1032a8110d6e..a307d68d79c6 100644 --- a/drivers/staging/comedi/drivers/amplc_pc236.c +++ b/drivers/staging/comedi/drivers/amplc_pc236.c | |||
@@ -78,18 +78,18 @@ unused. | |||
78 | */ | 78 | */ |
79 | /* Disable interrupt, also clear any interrupt there */ | 79 | /* Disable interrupt, also clear any interrupt there */ |
80 | #define PCI236_INTR_DISABLE (PLX9052_INTCSR_LI1ENAB_DISABLED \ | 80 | #define PCI236_INTR_DISABLE (PLX9052_INTCSR_LI1ENAB_DISABLED \ |
81 | | PLX9052_INTCSR_LI1POL_HIGH \ | 81 | | PLX9052_INTCSR_LI1POL_HIGH \ |
82 | | PLX9052_INTCSR_LI2POL_HIGH \ | 82 | | PLX9052_INTCSR_LI2POL_HIGH \ |
83 | | PLX9052_INTCSR_PCIENAB_DISABLED \ | 83 | | PLX9052_INTCSR_PCIENAB_DISABLED \ |
84 | | PLX9052_INTCSR_LI1SEL_EDGE \ | 84 | | PLX9052_INTCSR_LI1SEL_EDGE \ |
85 | | PLX9052_INTCSR_LI1CLRINT_ASSERTED) | 85 | | PLX9052_INTCSR_LI1CLRINT_ASSERTED) |
86 | /* Enable interrupt, also clear any interrupt there. */ | 86 | /* Enable interrupt, also clear any interrupt there. */ |
87 | #define PCI236_INTR_ENABLE (PLX9052_INTCSR_LI1ENAB_ENABLED \ | 87 | #define PCI236_INTR_ENABLE (PLX9052_INTCSR_LI1ENAB_ENABLED \ |
88 | | PLX9052_INTCSR_LI1POL_HIGH \ | 88 | | PLX9052_INTCSR_LI1POL_HIGH \ |
89 | | PLX9052_INTCSR_LI2POL_HIGH \ | 89 | | PLX9052_INTCSR_LI2POL_HIGH \ |
90 | | PLX9052_INTCSR_PCIENAB_ENABLED \ | 90 | | PLX9052_INTCSR_PCIENAB_ENABLED \ |
91 | | PLX9052_INTCSR_LI1SEL_EDGE \ | 91 | | PLX9052_INTCSR_LI1SEL_EDGE \ |
92 | | PLX9052_INTCSR_LI1CLRINT_ASSERTED) | 92 | | PLX9052_INTCSR_LI1CLRINT_ASSERTED) |
93 | 93 | ||
94 | /* | 94 | /* |
95 | * Board descriptions for Amplicon PC36AT and PCI236. | 95 | * Board descriptions for Amplicon PC36AT and PCI236. |
@@ -150,12 +150,13 @@ MODULE_DEVICE_TABLE(pci, pc236_pci_table); | |||
150 | 150 | ||
151 | /* this structure is for data unique to this hardware driver. If | 151 | /* this structure is for data unique to this hardware driver. If |
152 | several hardware drivers keep similar information in this structure, | 152 | several hardware drivers keep similar information in this structure, |
153 | feel free to suggest moving the variable to the struct comedi_device struct. */ | 153 | feel free to suggest moving the variable to the struct comedi_device struct. |
154 | */ | ||
154 | struct pc236_private { | 155 | struct pc236_private { |
155 | #ifdef CONFIG_COMEDI_PCI | 156 | #ifdef CONFIG_COMEDI_PCI |
156 | /* PCI device */ | 157 | /* PCI device */ |
157 | struct pci_dev *pci_dev; | 158 | struct pci_dev *pci_dev; |
158 | unsigned long lcr_iobase; /* PLX PCI9052 config registers in PCIBAR1 */ | 159 | unsigned long lcr_iobase; /* PLX PCI9052 config registers in PCIBAR1 */ |
159 | #endif | 160 | #endif |
160 | int enable_irq; | 161 | int enable_irq; |
161 | }; | 162 | }; |
@@ -345,9 +346,8 @@ static int pc236_attach(struct comedi_device *dev, struct comedi_devconfig *it) | |||
345 | #endif | 346 | #endif |
346 | { | 347 | { |
347 | ret = pc236_request_region(dev->minor, iobase, PC236_IO_SIZE); | 348 | ret = pc236_request_region(dev->minor, iobase, PC236_IO_SIZE); |
348 | if (ret < 0) { | 349 | if (ret < 0) |
349 | return ret; | 350 | return ret; |
350 | } | ||
351 | } | 351 | } |
352 | dev->iobase = iobase; | 352 | dev->iobase = iobase; |
353 | 353 | ||
@@ -399,11 +399,10 @@ static int pc236_attach(struct comedi_device *dev, struct comedi_devconfig *it) | |||
399 | printk("(pci %s) ", pci_name(pci_dev)); | 399 | printk("(pci %s) ", pci_name(pci_dev)); |
400 | #endif | 400 | #endif |
401 | } | 401 | } |
402 | if (irq) { | 402 | if (irq) |
403 | printk("(irq %u%s) ", irq, (dev->irq ? "" : " UNAVAILABLE")); | 403 | printk("(irq %u%s) ", irq, (dev->irq ? "" : " UNAVAILABLE")); |
404 | } else { | 404 | else |
405 | printk("(no irq) "); | 405 | printk("(no irq) "); |
406 | } | ||
407 | 406 | ||
408 | printk("attached\n"); | 407 | printk("attached\n"); |
409 | 408 | ||
@@ -422,27 +421,24 @@ static int pc236_detach(struct comedi_device *dev) | |||
422 | { | 421 | { |
423 | printk(KERN_DEBUG "comedi%d: %s: detach\n", dev->minor, | 422 | printk(KERN_DEBUG "comedi%d: %s: detach\n", dev->minor, |
424 | PC236_DRIVER_NAME); | 423 | PC236_DRIVER_NAME); |
425 | if (devpriv) { | 424 | if (devpriv) |
426 | pc236_intr_disable(dev); | 425 | pc236_intr_disable(dev); |
427 | } | 426 | |
428 | if (dev->irq) | 427 | if (dev->irq) |
429 | free_irq(dev->irq, dev); | 428 | free_irq(dev->irq, dev); |
430 | if (dev->subdevices) { | 429 | if (dev->subdevices) |
431 | subdev_8255_cleanup(dev, dev->subdevices + 0); | 430 | subdev_8255_cleanup(dev, dev->subdevices + 0); |
432 | } | ||
433 | if (devpriv) { | 431 | if (devpriv) { |
434 | #ifdef CONFIG_COMEDI_PCI | 432 | #ifdef CONFIG_COMEDI_PCI |
435 | if (devpriv->pci_dev) { | 433 | if (devpriv->pci_dev) { |
436 | if (dev->iobase) { | 434 | if (dev->iobase) |
437 | comedi_pci_disable(devpriv->pci_dev); | 435 | comedi_pci_disable(devpriv->pci_dev); |
438 | } | ||
439 | pci_dev_put(devpriv->pci_dev); | 436 | pci_dev_put(devpriv->pci_dev); |
440 | } else | 437 | } else |
441 | #endif | 438 | #endif |
442 | { | 439 | { |
443 | if (dev->iobase) { | 440 | if (dev->iobase) |
444 | release_region(dev->iobase, PC236_IO_SIZE); | 441 | release_region(dev->iobase, PC236_IO_SIZE); |
445 | } | ||
446 | } | 442 | } |
447 | } | 443 | } |
448 | if (dev->board_name) { | 444 | if (dev->board_name) { |