提交 d6e52e28 编写于 作者: T Tomi Valkeinen

drm/omap: accept NULL for dma_addr in omap_gem_pin

Allow NULL to be passed in 'dma_addr' for omap_gem_pin(), in case the
caller does not need the dma_addr.
Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: NJean-Jacques Hiblot <jjhiblot@ti.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191010120000.1421-4-jjhiblot@ti.com
上级 d3e4c46d
......@@ -819,9 +819,11 @@ int omap_gem_pin(struct drm_gem_object *obj, dma_addr_t *dma_addr)
refcount_inc(&omap_obj->dma_addr_cnt);
}
*dma_addr = omap_obj->dma_addr;
if (dma_addr)
*dma_addr = omap_obj->dma_addr;
} else if (omap_gem_is_contiguous(omap_obj)) {
*dma_addr = omap_obj->dma_addr;
if (dma_addr)
*dma_addr = omap_obj->dma_addr;
} else {
ret = -EINVAL;
goto fail;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册