[RFC PATCH 00/30] staging: comedi: dt9812: cleanup driver

H Hartley Sweeten hsweeten at visionengravers.com
Fri May 3 20:39:58 UTC 2013


Since the merge window is now open, this series is posted as an RFC.
Any comments would be appreciated. I'm hoping to get any issues
addressed so the series will be ready when the staging tree is
opened after the merge window closes.

This comedi driver is for a USB device and should be using the
comedi (*auto_attach) mechanism to attach to the device. Currently
the driver is a bit of a mess has a huge disconnect between the
loading of the usb_driver and the attaching of the comedi_device.
Right now this driver will even allow attaching to the comedi_device
even if the usb device is not attached to the system.

This series cleans up the driver and moves all the USB (*probe)
functionality into the comedi (*auto_attach) and the USB (*disconnect)
into the comedi (*detach). This ensures that a usb device is attached
before the comedi core does the (*auto_attach) to attach to the device.
This also allows consolidating all the private data into one struct
and makes the driver a lot easier to understand.

Some of these patches could probably be combined. Any comments are
welcome.

H Hartley Sweeten (30):
  staging: comedi: dt9812: move the usb framework functions to EOF
  staging: comedi: dt9812: rename the private data struct
  staging: comedi: dt9812: rename 'comedi' variable in struct slot_dt9812
  staging: comedi: dt9812: remove attaching by serial number
  staging: comedi: dt9812: tidy up usb_bulk_msg() calls
  staging: comedi: dt9812: pass the comedi_device * to dt9812_digital_in()
  staging: comedi: dt9812: pass the comedi_device * to dt9812_digital_out()
  staging: comedi: dt9812: pass the comedi_device * to dt9812_digital_out_shadow()
  staging: comedi: dt9812: pass the comedi_device * to dt9812_analog_in()
  staging: comedi: dt9812: pass the comedi_device * to dt9812_configure_gain()
  staging: comedi: dt9812: pass the comedi_device * to dt9812_configure_mux()
  staging: comedi: dt9812: pass the comedi_device * to dt9812_analog_out()
  staging: comedi: dt9812: tidy up the usb endpoint enumeration
  staging: comedi: dt9812: pass the comedi_device * to dt9812_analog_out_shadow()
  staging: comedi: dt9812: move the sempaphore used by the comedi_driver
  staging: comedi: dt9812: use module_comedi_usb_driver()
  staging: comedi: dt9812: move shadow values to private data
  staging: comedi: dt9812: remove 'interface' from usb private data
  staging: comedi: dt9812: factor the endpoint setup out of dt9812_probe()
  staging: comedi: dt9812: factor the device reset out of dt9812_probe()
  staging: comedi: dt9812: convert to use comedi (*auto_attach)
  staging: comedi: dt9812: remove unused variables from private data
  staging: comedi: dt9812: convert digital in subdevice to (*insn_bits)
  staging: comedi: dt9812: convert digital out subdevice to (*insn_bits)
  staging: comedi: dt9812: cleanup analog in subdevice (*insn_read)
  staging: comedi: dt9812: cleanup analog out subdevice (*insn_read)
  staging: comedi: dt9812: cleanup analog out subdevice (*insn_write)
  staging: comedi: dt9812: remove pr_fmt()
  staging: comedi: dt9812: use dev->class_dev for all dev_{level} messages
  staging: comedi: dt9812: remove some #if 0'ed out code

 drivers/staging/comedi/drivers/dt9812.c | 1023 ++++++++++++-------------------
 1 file changed, 388 insertions(+), 635 deletions(-)

-- 
1.8.1.4




More information about the devel mailing list