]> git.baikalelectronics.ru Git - kernel.git/commit
staging: comedi: vmk80xx: remove private data 'attached'
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Wed, 6 Feb 2013 00:23:16 +0000 (17:23 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 Feb 2013 02:07:11 +0000 (18:07 -0800)
commit2076759e7d2209b75ccce6050c474961e6c26cc8
treea5a909a1ddd1322234dae7f77d81bba666bddce1
parente5db12cba5e84f5f84bbe0f957e304de17b4722e
staging: comedi: vmk80xx: remove private data 'attached'

The 'attached' flag in the private data is set after the comedi_driver
(*auto_attach) function has completed successfully.

The only places it's checked are in rudimentary_check(), which does
some basic sanity checks before doing any of the subdevice operations,
and vmk80xx_auto_attach(), which is the comedi_driver (*auto_attach)
function.

The (*auto_attach) function can only be called as the result of a
successfull usb_driver (*probe). Part of the probe is to locate a
free slot in the static private data array. All free slots are
initialized to '0' so the 'attached' flag will always be cleared.

Remove the unneccessary 'attached' flag in the private data.

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