staging: comedi: pcmda12: tidy up subdevice init
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 4 Jun 2013 02:04:03 +0000 (19:04 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Jun 2013 22:35:38 +0000 (15:35 -0700)
For aesthetic reasons. add some whitespace to the subdevice init
and reorder it a bit.

Remove the 's->private = NULL', it was kzalloc'ed by the core and
will already be NULL.

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/pcmda12.c

index dfd2bff46e1acc56c3afbe57f7d49259325b4039..c725a9b0982e030624fc9df0eec707d5cd308346 100644 (file)
@@ -167,14 +167,13 @@ static int pcmda12_attach(struct comedi_device *dev,
                return ret;
 
        s = &dev->subdevices[0];
-       s->private = NULL;
-       s->maxdata = 0x0fff;
-       s->range_table = &pcmda12_ranges;
-       s->type = COMEDI_SUBD_AO;
-       s->subdev_flags = SDF_READABLE | SDF_WRITABLE;
-       s->n_chan = CHANS;
-       s->insn_write = &ao_winsn;
-       s->insn_read = &ao_rinsn;
+       s->type         = COMEDI_SUBD_AO;
+       s->subdev_flags = SDF_READABLE | SDF_WRITABLE;
+       s->n_chan       = CHANS;
+       s->maxdata      = 0x0fff;
+       s->range_table  = &pcmda12_ranges;
+       s->insn_write   = &ao_winsn;
+       s->insn_read    = &ao_rinsn;
 
        zero_chans(dev);        /* clear out all the registers, basically */