On 12/22/2010 01:10 PM, Felipe Balbi wrote:
DMA engine can choose not to implement ->is_req_compatible() call if
>they know they can make DMA work.
Hmm, ok then. But let's make it somehow like below:
. introduce the new function pointer to dma_controller structure
. introduce a function called musb_dma_map_request()
- that will ask if DMA can handle request and return early if it
can't.
- otherwise it will map the request
. introduce also musb_dma_unmap_request()
- that will check if request is mapped and return early if it
isn't.
- otherwise it will unmap the request
In musb_dma_map_request() you can call your new function pointer.
Then you have splitted all check/map/unmap logic to only one location
and everybody just makes call to those. Does that sound ok ? It would be
two patches, instead of one.
Yes, I will get back to you.
BTW, check your initial patch as there are a few typos in comments.
Oops sorry about that.
Thanks,
--
Mian Yousaf Kaukab
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html