参照元

説明

引数

返り値

参考

実装

/**
 * dma_buf_map_attachment - Returns the scatterlist table of the attachment;
 * mapped into _device_ address space. Is a wrapper for map_dma_buf() of the
 * dma_buf_ops.
 * @attach:     [in]    attachment whose scatterlist is to be returned
 * @direction:  [in]    direction of DMA transfer
 *
 * Returns sg_table containing the scatterlist to be returned; returns ERR_PTR
 * on error.
 */
struct sg_table *dma_buf_map_attachment(struct dma_buf_attachment *attach,
                                        enum dma_data_direction direction)
{
        struct sg_table *sg_table = ERR_PTR(-EINVAL);
        might_sleep();
        if (WARN_ON(!attach || !attach->dmabuf))
                return ERR_PTR(-EINVAL);
        sg_table = attach->dmabuf->ops->map_dma_buf(attach, direction);
        if (!sg_table)
                sg_table = ERR_PTR(-ENOMEM);
        return sg_table;
}
EXPORT_SYMBOL_GPL(dma_buf_map_attachment);

コメント


トップ   編集 凍結 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2016-02-25 (木) 13:55:37