]> git.karo-electronics.de Git - karo-tx-linux.git/commit
staging: comedi: dt9812: convert to use comedi (*auto_attach)
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 14 May 2013 21:30:20 +0000 (14:30 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 16 May 2013 23:26:00 +0000 (16:26 -0700)
commitb78750c1234d2abafb12c61a9e96c7860f47a6e7
treeba641d1d2e7a8ae07a40764f13955e03e7116620
parent8db1eba1e267bcd8d524eab3bdc2357b6d770f33
staging: comedi: dt9812: convert to use comedi (*auto_attach)

Converting this driver to use the comedi (*auto_attach) mechanism
allows pushing the usb (*probe) into the comedi (*auto_attach) and
the usb (disconnect) into the comedi (*detach). This removes the
disconnect between the usb driver and the comedi driver. Now when
the comedi driver is attached it will always have a usb device
associated with it.

This removes the 16 usb device limitation and allows bringing all
the private data into a single struct that can be kzalloc'ed when
the comedi driver is (*auto_attached). It also allows removing the
the sanity checks that make sure a usb device is connected to the
comedi device in the helper functions.

For aesthetic reasons, add some whitespace to the subdevice init.

Also, fix the analog out subdevice. There are 2 analog output
channels available on the usb device.

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