]> Pileus Git - ~andy/linux/commit
staging: comedi: pcmuio: tidy up pcmuio_attach()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Thu, 5 Dec 2013 23:54:15 +0000 (16:54 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Dec 2013 21:10:03 +0000 (13:10 -0800)
commitfc5ba1bd717b1daad46bb990f86cb30b2f2e219e
treeab21c3cd42ca120f3aaa9cd098063438ced909af
parentfbd66a7e87e0289f389d20f385bb3062d617f2d3
staging: comedi: pcmuio: tidy up pcmuio_attach()

Clean up the local variables, 'sdev_no' and 'asic' are both used in
simple for () loops. Use the local variable 'i' for both cases. The
'n_subdevs' variable is only used in one place, just remove it.

For aesthetics, add some whitespace to the subdevice init and reorder
it to follow the more typical style in comedi drivers.

Remove the unnecessary init of s->len_chanlist for subdevices that do
not support async commands (interrupts). The core will default it to
the correct value.

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