Re: RFC: vb2: replace alloc_ctx by struct device * in vb2_queue

2014-09-22 Thread Marek Szyprowski
Hello, On 2014-09-21 15:05, Hans Verkuil wrote: Hi Marek, Pawel, Currently for dma_config (and the dma_sg code that I posted before) drivers have to allocate a alloc_ctx context, but in practice that just contains a device pointer. Is there any reason why we can't just change in struct

RFC: vb2: replace alloc_ctx by struct device * in vb2_queue

2014-09-21 Thread Hans Verkuil
Hi Marek, Pawel, Currently for dma_config (and the dma_sg code that I posted before) drivers have to allocate a alloc_ctx context, but in practice that just contains a device pointer. Is there any reason why we can't just change in struct vb2_queue: void

Re: RFC: vb2: replace alloc_ctx by struct device * in vb2_queue

2014-09-21 Thread Pawel Osciak
Hi Hans, I'm not very much against it, but I'm not sure how option 2 is significantly simpler than option 1. It's just one cast away from being the same, unless you have some more rework in mind, e.g. making vb2 aware of devices somehow and skip driver's involvement for example? Thanks, Pawel On