staging: comedi: das16m1: init local variables when declared
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 3 May 2016 19:29:59 +0000 (12:29 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 18 Jun 2016 03:42:21 +0000 (20:42 -0700)
For aesthetics, init the comedi_subdevice, comedi_async, and comedi_cmd
pointers when the local variables are declared.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/das16m1.c

index 3a62f5adfc5775e0145dedb1980dbf3408474c59..d4b1b92cb11267046270cb12c9a31fbb523b6986 100644 (file)
@@ -373,16 +373,12 @@ static int das16m1_do_insn_bits(struct comedi_device *dev,
 static void das16m1_handler(struct comedi_device *dev, unsigned int status)
 {
        struct das16m1_private_struct *devpriv = dev->private;
-       struct comedi_subdevice *s;
-       struct comedi_async *async;
-       struct comedi_cmd *cmd;
+       struct comedi_subdevice *s = dev->read_subdev;
+       struct comedi_async *async = s->async;
+       struct comedi_cmd *cmd = &async->cmd;
        u16 num_samples;
        u16 hw_counter;
 
-       s = dev->read_subdev;
-       async = s->async;
-       cmd = &async->cmd;
-
        /* figure out how many samples are in fifo */
        hw_counter = comedi_8254_read(devpriv->counter, 1);
        /*