diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2013-03-22 09:45:41 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-03-25 11:41:51 -0700 |
commit | cacedd0ce5f3482574dd18ce218a3f4440b4c828 (patch) | |
tree | 4ddc36aa48f9fdc83542403fc4f71135f87d9387 /drivers/staging/comedi/drivers/ni_labpc.c | |
parent | 7d47f0f4c6005b74cc73be01869051d2aee8102e (diff) |
staging: comedi: ni_labpc: move declaration of local var 'dma_flags'
In labpc_common_attach(), move the declaration of the local variable
'dma_flags' to remove the need for the extra #ifdef/#endif.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi/drivers/ni_labpc.c')
-rw-r--r-- | drivers/staging/comedi/drivers/ni_labpc.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/staging/comedi/drivers/ni_labpc.c b/drivers/staging/comedi/drivers/ni_labpc.c index 33e9f4dee6d3..2c932e6d97cc 100644 --- a/drivers/staging/comedi/drivers/ni_labpc.c +++ b/drivers/staging/comedi/drivers/ni_labpc.c @@ -1668,12 +1668,9 @@ int labpc_common_attach(struct comedi_device *dev, unsigned long iobase, const struct labpc_boardinfo *board = comedi_board(dev); struct labpc_private *devpriv = dev->private; struct comedi_subdevice *s; - int i; unsigned long isr_flags; -#ifdef CONFIG_ISA_DMA_API - unsigned long dma_flags; -#endif int ret; + int i; dev_info(dev->class_dev, "ni_labpc: %s\n", board->name); if (iobase == 0) { @@ -1728,6 +1725,8 @@ int labpc_common_attach(struct comedi_device *dev, unsigned long iobase, dev_err(dev->class_dev, "invalid dma channel %u\n", dma_chan); return -EINVAL; } else if (dma_chan) { + unsigned long dma_flags; + /* allocate dma buffer */ devpriv->dma_buffer = kmalloc(dma_buffer_size, GFP_KERNEL | GFP_DMA); |