|
@@ -155,7 +155,8 @@ static void vb2_dc_put(void *buf_priv)
|
|
|
kfree(buf);
|
|
|
}
|
|
|
|
|
|
-static void *vb2_dc_alloc(void *alloc_ctx, unsigned long size, gfp_t gfp_flags)
|
|
|
+static void *vb2_dc_alloc(void *alloc_ctx, unsigned long size,
|
|
|
+ enum dma_data_direction dma_dir, gfp_t gfp_flags)
|
|
|
{
|
|
|
struct vb2_dc_conf *conf = alloc_ctx;
|
|
|
struct device *dev = conf->dev;
|
|
@@ -176,6 +177,7 @@ static void *vb2_dc_alloc(void *alloc_ctx, unsigned long size, gfp_t gfp_flags)
|
|
|
/* Prevent the device from being released while the buffer is used */
|
|
|
buf->dev = get_device(dev);
|
|
|
buf->size = size;
|
|
|
+ buf->dma_dir = dma_dir;
|
|
|
|
|
|
buf->handler.refcount = &buf->refcount;
|
|
|
buf->handler.put = vb2_dc_put;
|