staging: comedi: jr3_pci: tidy up subdevice init
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Fri, 7 Mar 2014 20:40:55 +0000 (13:40 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 17 Mar 2014 19:38:52 +0000 (12:38 -0700)
commit050389f5eb81180410f3033306c5f7d9f7f362a8
tree1ddb910ca79357de9e89562912fb03039c318051
parentc6cd0eefb27b47a3f67ec0adbea14b4f97d72ec9
staging: comedi: jr3_pci: tidy up subdevice init

For aesthetics, use a pointer to the comedi_subdevice instead of
accessing the dev->subdevices array directly.

Move the local variable for the subdevice private data so that
this function does not declare the variable twice.

Change the kzalloc for the subdevice private data to remove the
sizeof(struct foo).

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