参照元

説明

引数

返り値

参考

実装

/**
 * dma_buf_fd - returns a file descriptor for the given dma_buf
 * @dmabuf:     [in]    pointer to dma_buf for which fd is required.
 * @flags:      [in]    flags to give to fd
 *
 * On success, returns an associated 'fd'. Else, returns error.
 */
int dma_buf_fd(struct dma_buf *dmabuf, int flags)
{
        int fd;

        if (!dmabuf || !dmabuf->file)
                return -EINVAL;

        fd = get_unused_fd_flags(flags);
        if (fd < 0)
                return fd;
        fd_install(fd, dmabuf->file);
        return fd;
}
EXPORT_SYMBOL_GPL(dma_buf_fd);

コメント


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