staging: comedi: serial2002: don't assume the number of subdevices to detach
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Fri, 5 Apr 2013 23:10:01 +0000 (16:10 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 Apr 2013 17:27:44 +0000 (10:27 -0700)
commitfd47579ba065f74bb5f833248ddcdfbb71feddcb
treea31a92dc3b35f4e55e3ebe128161f8f112364bca
parentee422bb687e6dddd446d1d2c83345194f5201d2f
staging: comedi: serial2002: don't assume the number of subdevices to detach

Use the number of subdevices allocated (dev->n_subdevices) in the
(*detach) instead of assuming a given number.

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