]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitaba486f26282fa0fa9de923d739537f6705d5898
tree1ddb910ca79357de9e89562912fb03039c318051
parente5824151eac7c8efc891325009d0b87929b17b1b
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