参照元

説明

引数

返り値

参考

実装

/**
 * dma_buf_get - returns the dma_buf structure related to an fd
 * @fd: [in]    fd associated with the dma_buf to be returned
 *
 * On success, returns the dma_buf structure associated with an fd; uses
 * file's refcounting done by fget to increase refcount. returns ERR_PTR
 * otherwise.
 */
struct dma_buf *dma_buf_get(int fd)
{
        struct file *file;
        file = fget(fd);
        if (!file)
                return ERR_PTR(-EBADF);
        if (!is_dma_buf_file(file)) {
                fput(file);
                return ERR_PTR(-EINVAL);
        }
        return file->private_data;
}
EXPORT_SYMBOL_GPL(dma_buf_get);

コメント


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