]> rtime.felk.cvut.cz Git - linux-imx.git/commitdiff
staging: comedi: ni_labpc: move declaration of local var 'irq_flags'
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Fri, 22 Mar 2013 16:46:53 +0000 (09:46 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 25 Mar 2013 18:41:52 +0000 (11:41 -0700)
In labpc_ai_cmd(), move the declaration of the local variable
'irq_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>
drivers/staging/comedi/drivers/ni_labpc.c

index 54669b46e7e2f54e1b0c68fef7f4b84f4b675ff2..f9c720938e2780e5a3b0845aecf4b97360cc7a21 100644 (file)
@@ -851,9 +851,6 @@ static int labpc_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
        const struct labpc_boardinfo *board = comedi_board(dev);
        struct labpc_private *devpriv = dev->private;
        int channel, range, aref;
-#ifdef CONFIG_ISA_DMA_API
-       unsigned long irq_flags;
-#endif
        int ret;
        struct comedi_async *async = s->async;
        struct comedi_cmd *cmd = &async->cmd;
@@ -1026,6 +1023,8 @@ static int labpc_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
 #ifdef CONFIG_ISA_DMA_API
        /*  set up dma transfer */
        if (xfer == isa_dma_transfer) {
+               unsigned long irq_flags;
+
                irq_flags = claim_dma_lock();
                disable_dma(devpriv->dma_chan);
                /* clear flip-flop to make sure 2-byte registers for