On 2013-07-30 01:42, H Hartley Sweeten wrote:
The usbdux and usbduxsigma drivers are very similar and should be able to share some common code. Tidy up the drivers a bit so that the common pieces can be located and pulled out. H Hartley Sweeten (18): staging: comedi: usbdux: generalize the usb_submit_urb functions staging: comedi: usbduxsigma: generalize the ai/ao usb_kill_urb() staging: comedi: usbduxsigma: remove the usb endpoint defines staging: comedi: usbdux: tidy up usbdux_pwm_period() staging: comedi: usbdux: tidy up usbdux_pwm_pattern() staging: comedi: usbdux: tidy up usbdux_pwm_write() staging: comedi: usbdux: remove usbdux_pwm_read() staging: comedi: usbdux: tidy up usbdux_pwm_config() staging: comedi: usbdux: return void from usbdux_pwm_pattern() staging: comedi: usbduxsigma: return void from usbduxsigma_pwm_pattern() staging: comedi: usbdux: tidy up usbdux_alloc_usb_buffers() staging: comedi: usbduxsigma: 'dac_commands' does not need to be kzalloc()'d staging: comedi: usbduxsigma: init 'pwm_buf_sz' in usbduxsigma_auto_attach() staging: comedi: usbduxsigma: move urb unlink into usbduxsigma_detach() staging: comedi: usbduxsigma: always clear the usb intfdata in (*detach) staging: comedi: usbdux: tidy up usbdux_detach() staging: comedi: usbdux: tidy up usbdux_free_usb_buffers() staging: comedi: usbduxsigma: absorb usbduxsigma_attach_common() into caller drivers/staging/comedi/drivers/usbdux.c | 242 +++++++++-------------- drivers/staging/comedi/drivers/usbduxsigma.c | 276 ++++++++++++--------------- 2 files changed, 207 insertions(+), 311 deletions(-)
Looks fine! I was a little worried about not checking for a NULL pointer before calling usb_kill_urb() in patch 02, but it can cope with that.
Reviewed-by: Ian Abbott <abbotti@xxxxxxxxx> -- -=( Ian Abbott @ MEV Ltd. E-mail: <abbotti@xxxxxxxxx> )=- -=( Tel: +44 (0)161 477 1898 FAX: +44 (0)161 718 3587 )=- _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel