diff --git a/drivers/dma-buf/dma-buf-io.c b/drivers/dma-buf/dma-buf-io.c index e432194a5dfc..8440151de860 100644 --- a/drivers/dma-buf/dma-buf-io.c +++ b/drivers/dma-buf/dma-buf-io.c @@ -43,6 +43,18 @@ static void dma_buf_io_kill_map(struct dma_buf_io_ctx *ctx) dma_buf_io_map_release(map); } +/** + * dma_buf_io_init_map - Initialise the map. + * @ctx: [in] dma-buf I/O context the map is created for + * @map: [in] dma-buf I/O map + * @sgt: [in] the backing scatter-gather table + * + * Importer's helper that initialises @map for the provided I/O context + * and scatter-gather table. The importer should call it once for each map + * on creation. + * + * Return: 0 on success, or a negative errno code otherwise. + */ int dma_buf_io_init_map(struct dma_buf_io_ctx *ctx, struct dma_buf_io_map *map, struct sg_table *sgt) {