Re: [PATCH 33/53] staging: comedi: usbdux: tidy up usbdux_ai_inttrig()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2013-07-25 16:01, Ian Abbott wrote:
On 2013-07-24 22:18, H Hartley Sweeten wrote:
Rename the local variable used for the private data pointer to the
comedi "norm".

Remove the unnecessary sanity check of the private data pointer. This
function can only be called is the private data was allocated during
the attach.

Tidy up the exit path using goto to ensure that the semaphore it
released.

Set the ai_cmd_running flag after submitting the urbs to remove the
need to clear the flag if the submit fails.

It's possible that (some of) the urbs could complete before you set the
ai_cmd_running flag, and then usbdux_ai_urb_complete() would see the

I got the function name wrong - it's actually usbduxsub_ai_isoc_irq().

wrong value for ai_cmd_running.  (I don't know if it needs memory
barriers as well - there are probably enough memory barriers in the usb
subsystem already.)


--
-=( 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




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux