Instead of the old pcmcia_request_irq() interface, drivers may now
choose between:
- calling request_irq/free_irq directly. Use the IRQ from *p_dev->irq.
- use pcmcia_request_irq(p_dev, handler_t); the PCMCIA core will
clean up automatically on calls to pcmcia_disable_device() or
device ejection.
- drivers still not capable of IRQF_SHARED (or not telling us so) may
use the deprecated pcmcia_request_exclusive_irq() for the time
being; they might receive a shared IRQ nonetheless.
CC: linux-bluetooth@vger.kernel.org
CC: netdev@vger.kernel.org
CC: linux-wireless@vger.kernel.org
CC: linux-serial@vger.kernel.org
CC: alsa-devel@alsa-project.org
CC: linux-usb@vger.kernel.org
CC: linux-ide@vger.kernel.org
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
As it's only used there it makes no sense relying on pcmcia_request_irq().
CC: alsa-devel@alsa-project.org
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files. percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.
percpu.h -> slab.h dependency is about to be removed. Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability. As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.
http://userweb.kernel.org/~tj/misc/slabh-sweep.py
The script does the followings.
* Scan files for gfp and slab usages and update includes such that
only the necessary includes are there. ie. if only gfp is used,
gfp.h, if slab is used, slab.h.
* When the script inserts a new include, it looks at the include
blocks and try to put the new include such that its order conforms
to its surrounding. It's put in the include block which contains
core kernel includes, in the same order that the rest are ordered -
alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
doesn't seem to be any matching order.
* If the script can't find a place to put a new include (mostly
because the file doesn't have fitting include block), it prints out
an error message indicating which .h file needs to be added to the
file.
The conversion was done in the following steps.
1. The initial automatic conversion of all .c files updated slightly
over 4000 files, deleting around 700 includes and adding ~480 gfp.h
and ~3000 slab.h inclusions. The script emitted errors for ~400
files.
2. Each error was manually checked. Some didn't need the inclusion,
some needed manual addition while adding it to implementation .h or
embedding .c file was more appropriate for others. This step added
inclusions to around 150 files.
3. The script was run again and the output was compared to the edits
from #2 to make sure no file was left behind.
4. Several build tests were done and a couple of problems were fixed.
e.g. lib/decompress_*.c used malloc/free() wrappers around slab
APIs requiring slab.h to be added manually.
5. The script was run on all .h files but without automatically
editing them as sprinkling gfp.h and slab.h inclusions around .h
files could easily lead to inclusion dependency hell. Most gfp.h
inclusion directives were ignored as stuff from gfp.h was usually
wildly available and often used in preprocessor macros. Each
slab.h inclusion directive was examined and added manually as
necessary.
6. percpu.h was updated not to include slab.h.
7. Build test were done on the following configurations and failures
were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
distributed build env didn't work with gcov compiles) and a few
more options had to be turned off depending on archs to make things
build (like ipr on powerpc/64 which failed due to missing writeq).
* x86 and x86_64 UP and SMP allmodconfig and a custom test config.
* powerpc and powerpc64 SMP allmodconfig
* sparc and sparc64 SMP allmodconfig
* ia64 SMP allmodconfig
* s390 SMP allmodconfig
* alpha SMP allmodconfig
* um on x86_64 SMP allmodconfig
8. percpu.h modifications were reverted so that it could be applied as
a separate patch and serve as bisection point.
Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.
Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
Turns out that multiple people sent pretty much the same patch
for the same staging drivers. Commit these in two different
branches and merge them together to get a more complete coverage
of the cleanup and properly credit everyone for the work that they
did.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
ERROR: do not initialise externals to 0 or NULL
+int comedi_num_legacy_minors = 0;
WARNING: braces {} are not necessary for single statement blocks
+ if (s->subdev_flags & SDF_CMD_READ) {
+ kill_fasync(&dev->async_queue, SIGIO, POLL_IN);
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if (s->subdev_flags & SDF_CMD_WRITE) {
+ kill_fasync(&dev->async_queue, SIGIO, POLL_OUT);
+ }
Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is a patch to the ni_labpc.c file that fixes suspect code indent for
conditional statements found by the checkpatch.pl tool
Signed-off-by: Stewart Robertson <stewart_r@aliencamel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is a patch to the ni_labpc.c file that fixes up all the brace
warnings found by the checkpatch.pl tool
Signed-off-by: Maurice Dawson <mauricedawson2699@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is a patch to the ni_labpc.c file that fixes up a brace warning
found by the checkpatch.pl tool
Signed-off-by: Maurice Dawson <mauricedawson2699@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is a patch to the ni_labpc.c file that fixes up a brace warning
found by the checkpatch.pl tool.
Signed-off-by: Maurice Dawson <maurice2699@btinternet.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This fixes some coding style issues like include KERN_ facility levels
in some printk() and one trailing whitespace error.
Signed-off-by: Chihau Chau <chihau@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is a patch to the ni_660x.c file that fixes up the brace and 80
character issues found by the checkpatch tool
Signed-off-by: Graham M Howe <gmhowe@btopenworld.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is a patch to the ni_65xx.c file that fixes up a brace
warning found by the checkpatch.pl tool
Signed-off-by: Graham M Howe <gmhowe@btopenworld.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This fixes all checkpatch issues in the pcmad comedi driver.
Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This fixes a line over 80 characters and a brace warnings.
Signed-off-by: Chihau Chau <chihau@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
WARNING: Use #include <linux/io.h> instead of <asm/io.h>
+#include <asm/io.h>
WARNING: braces {} are not necessary for any arm of this statement
+ if (dev->driver) {
[...]
+ } else {
[...]
WARNING: braces {} are not necessary for single statement blocks
+ if (insn->insn == INSN_READ) {
+ data[0] = (new_data[1] >> (chan - base_bitfield_channel)) & 1;
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if (async->prealloc_buf && async->prealloc_bufsz == new_size) {
+ return 0;
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if (async->buf_page_list[i].virt_addr == NULL) {
+ break;
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if ((int)(async->buf_write_alloc_count + nbytes - free_end) > 0) {
+ nbytes = free_end - async->buf_write_alloc_count;
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if ((int)(async->buf_write_alloc_count + nbytes - free_end) > 0) {
+ nbytes = 0;
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if (async->buf_write_ptr >= async->prealloc_bufsz) {
+ async->buf_write_ptr %= async->prealloc_bufsz;
+ }
Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
ERROR: code indent should use tabs where possible
+ 0 = [-10,10]$
ERROR: code indent should use tabs where possible
+ 0 = [-10,10]$
WARNING: braces {} are not necessary for single statement blocks
+ if (stat & (DT_S_COMPOSITE_ERROR | DT_S_READY)) {
+ return stat;
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if (stat & DT_S_COMPOSITE_ERROR) {
+ return stat;
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if (stat & DT_S_READY) {
+ return 0;
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if (stat & DT_S_COMPOSITE_ERROR) {
+ return stat;
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if (stat & DT_S_READY) {
+ return 0;
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if (!(stat & DT_S_READY)) {
+ printk("dt2801: !ready in dt2801_writecmd(), ignoring\n");
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if (!timeout) {
+ printk("dt2801: timeout 1 status=0x%02x\n", stat);
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if (!timeout) {
+ printk("dt2801: timeout 2 status=0x%02x\n", stat);
+ }
WARNING: braces {} are not necessary for any arm of this statement
+ if (stat == -ETIME) {
[...]
+ } else {
[...]
Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
WARNING: braces {} are not necessary for any arm of this statement
+ if (data[0] == COMEDI_OUTPUT) {
[...]
+ } else {
[...]
Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
WARNING: braces {} are not necessary for single statement blocks
+ if (fifo_empty) {
+ break;
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if (irq) {
+ printk(", irq %u", irq);
+ }
Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
ERROR: Macros with complex values should be enclosed in parenthesis
+#define N_WORDS 3000*64
Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
ERROR: do not initialise statics to 0 or NULL
+static unsigned int ui_Temp = 0;
WARNING: braces {} are not necessary for any arm of this statement
+ if (data[1]) {
[...]
+ } else
[...]
WARNING: braces {} are not necessary for single statement blocks
+ for (i = 0; i < devpriv->ui_AiNbrofChannels; i++) {
+ devpriv->ui_AiChannelList[i] = data[4 + i];
+ }
ERROR: that open brace { should be on the previous line
+ } else /* EOC */
+ {
WARNING: braces {} are not necessary for any arm of this statement
+ if (data[1]) {
[...]
+ } else {
[...]
ERROR: that open brace { should be on the previous line
+ if (insn->unused[0] == 222) /* second insn read */
+ {
WARNING: braces {} are not necessary for single statement blocks
+ for (i = 0; i < insn->n; i++) {
+ data[i] = devpriv->ui_AiReadData[i];
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if (cmd->start_src != TRIG_NOW && cmd->start_src != TRIG_EXT) {
+ err++;
+ }
ERROR: that open brace { should be on the previous line
+ if (cmd->scan_begin_src == TRIG_TIMER) /* Test Delay timing */
+ {
ERROR: that open brace { should be on the previous line
+ if (cmd->convert_src == TRIG_TIMER) /* Test Acquisition timing */
+ {
WARNING: braces {} are not necessary for any arm of this statement
+ if (cmd->stop_src == TRIG_COUNT) {
[...]
+ } else {
[...]
WARNING: braces {} are not necessary for single statement blocks
+ if (devpriv->b_ExttrigEnable == APCI3120_ENABLE) {
+ i_APCI3120_ExttrigEnable(dev); /* activate EXT trigger */
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if (dmalen0 > (devpriv->ui_AiDataLength)) {
+ dmalen0 = devpriv->ui_AiDataLength;
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if (dmalen1 > (devpriv->ui_AiDataLength)) {
+ dmalen1 = devpriv->ui_AiDataLength;
+ }
WARNING: braces {} are not necessary for any arm of this statement
+ if (CR_RANGE(chanlist[i]) < APCI3120_BIPOLAR_RANGES) {
[...]
+ } else {
[...]
ERROR: that open brace { should be on the previous line
+ if (devpriv->b_EocEosInterrupt == APCI3120_ENABLE) /* enable this in without DMA ??? */
+ {
ERROR: that open brace { should be on the previous line
+ if (data[0] == APCI3120_TIMER) /* initialize timer */
+ {
ERROR: that open brace { should be on the previous line
+ } else /* Initialize Watch dog */
+ {
ERROR: that open brace { should be on the previous line
+ if (data[0] == 2) /* write new value */
+ {
ERROR: that open brace { should be on the previous line
+ if (devpriv->b_Timer2Mode == APCI3120_TIMER) /* start timer */
+ {
ERROR: that open brace { should be on the previous line
+ } else /* start watch dog */
+ {
ERROR: that open brace { should be on the previous line
+ if (devpriv->b_Timer2Mode == APCI3120_TIMER) /* start timer */
+ {
ERROR: that open brace { should be on the previous line
+ } else /* Read watch dog status */
+ {
WARNING: braces {} are not necessary for single statement blocks
+ if (!devpriv->b_OutputMemoryStatus) {
+ ui_Temp = 0;
+
+ } /* if(!devpriv->b_OutputMemoryStatus ) */
ERROR: code indent should use tabs where possible
+ data[0] Value to be written$
ERROR: code indent should use tabs where possible
+ data[1] :1 Set digital o/p ON$
ERROR: code indent should use tabs where possible
+ data[1] 2 Set digital o/p OFF with memory ON$
ERROR: that open brace { should be on the previous line
+ if (ui_Range) /* if 1 then unipolar */
+ {
ERROR: that open brace { should be on the previous line
+ } else /* if 0 then bipolar */
+ {
ERROR: that open brace { should be on the previous line
+ do /* Waiting of DA_READY BIT */
+ {
Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
ERROR: code indent should use tabs where possible
+ NONE$
ERROR: do not initialise statics to 0 or NULL
+static struct pcmcia_device *cur_dev = NULL;
Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
WARNING: braces {} are not necessary for single statement blocks
+ if (dev->iobase) {
+ comedi_pci_disable(devpriv->pci_dev);
+ }
Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
WARNING: braces {} are not necessary for any arm of this statement
+ if (it->options[2]) {
[...]
+ } else {
[...]
WARNING: braces {} are not necessary for single statement blocks
+ if (devpriv->registers) {
+ comedi_pci_disable(devpriv->pci_dev);
+ }
Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
WARNING: braces {} are not necessary for any arm of this statement
+ if (thisboard->has_dio) {
[...]
+ } else {
[...]
WARNING: braces {} are not necessary for single statement blocks
+ if (devpriv->BADR0) {
+ comedi_pci_disable(devpriv->pci_dev);
+ }
Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
WARNING: braces {} are not necessary for single statement blocks
+ if (devpriv->dio_reg_base) {
+ comedi_pci_disable(devpriv->pci_dev);
+ }
WARNING: braces {} are not necessary for single statement blocks
+ for (i = 0; i < thisboard->n_8255; i++) {
+ subdev_8255_cleanup(dev, dev->subdevices + i);
+ }
Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
WARNING: braces {} are not necessary for single statement blocks
+ if (devpriv->dac) {
+ comedi_pci_disable(devpriv->pci_dev);
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if (inw_p(devpriv->dac + DACALIBRATION1) & SERIAL_OUT_BIT) {
+ value |= 1 << (value_width - i);
+ }
WARNING: braces {} are not necessary for single statement blocks
+ for (i = 0; i < max_num_caldacs; i++) {
+ cal2_bits |= DESELECT_CALDAC_BIT(i);
+ }
WARNING: braces {} are not necessary for single statement blocks
+ for (i = 0; i < max_num_caldacs; i++) {
+ cal2_bits |= DESELECT_CALDAC_BIT(i);
+ }
Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
ERROR: "foo * bar" should be "foo *bar"
+ uint8_t * data);
WARNING: braces {} are not necessary for single statement blocks
+ if (devpriv->s5933_config) {
+ comedi_pci_disable(devpriv->pci_dev);
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if (cmd->stop_src == TRIG_COUNT) {
+ devpriv->count = cmd->chanlist_len * cmd->stop_arg;
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if (cmd->stop_src == TRIG_COUNT) {
+ devpriv->ao_count = cmd->chanlist_len * cmd->stop_arg;
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if (cmd->stop_src == TRIG_COUNT) {
+ devpriv->ao_count -= num_points;
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if (dev->attached == 0) {
+ return IRQ_NONE;
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if ((status & (INT | EOAI | LADFUL | DAHFI | DAEMI)) == 0) {
+ comedi_error(dev, "spurious interrupt");
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if (status & (DAHFI | DAEMI)) {
+ handle_ao_interrupt(dev, status);
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if (async->cmd.stop_src == TRIG_COUNT) {
+ devpriv->ao_count -= num_points;
+ }
ERROR: "foo * bar" should be "foo *bar"
+ uint8_t * data)
Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
ERROR: do not initialise externals to 0 or NULL
+unsigned int ui_InterruptStatus = 0;
WARNING: braces {} are not necessary for single statement blocks
+ else {
+ outl(0x6, devpriv->iobase + APCI1032_DIGITAL_IP_IRQ);
+ } /* else if(data[1] == ADDIDATA_OR) */
WARNING: braces {} are not necessary for single statement blocks
+ if (data[1] == 1) {
+ *data = ui_InterruptStatus;
+ } /* if(data[1]==1) */
Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
ERROR: code indent should use tabs where possible
+ const struct comedi_lrange *pr_AiRangelist;^I/* rangelist for A/D */$
ERROR: code indent should use tabs where possible
+ const struct comedi_lrange *pr_AoRangelist;^I/* rangelist for D/A */$
Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
WARNING: braces {} are not necessary for any arm of this statement
+ if (i_Counter == 0) {
[...]
+ } else {
[...]
Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
BKL isn't anymore present into these files thus it is no necessary still include smp_lock.h.
Signed-off-by: Alessio Igor Bogani <abogani@texware.it>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Increased timeout for digital output dma loading, due to report of it
being too short for some hardware.
Signed-off-by: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
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 fixes all checkpatch issues in the amplc_dio200 comedi driver.
Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This fixes all checkpatch issues in the aio_iiro_16 comedi driver.
Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is a patch to the ni_labpc.c file that fixes the brace warnings and
comments over 80 characters found by the checkpatch.pl tool. Some code
still goes over 80 characters because I didn't know what to do with it.
Signed-off-by: Stewart Robertson <stewart_r@aliencamel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is a patch to the ni_daq_700.c file that fixes up brace and 80 character warnings
found by the checkpatch.pl tool
Signed-off-by: Graham M Howe <gman.1352@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is a patch to ni_atmio.c file to fix up bracing style problems
found by checkpatch.pl tool
Signed-off-by: Graham M Howe <gman.1352@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This fixes all checkpatch issues in the rti800 comedi driver.
Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This fixes almost all checkpatch issues in the ni_pcidio comedi driver.
Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>