*参照元 [#h724e1d7]
#backlinks

*説明 [#s6d5633f]
-パス: [[linux-4.4.1/drivers/dma-buf/dma-buf.c]]

-FIXME: これは何?
--説明


**引数 [#o0d6d161]
-int fd
--ファイルディスクリプタ


**返り値 [#c1ab1919]
-struct dma_buf *
--DMA buffer
--[[linux-4.4.1/dma_buf]]


**参考 [#d36716d2]


*実装 [#m4582d22]
 /**
  * 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;
 
-
--[[linux-4.4.1/file]]

         file = fget(fd);
 
-
--[[linux-4.4.1/fget()]]

         if (!file)
                 return ERR_PTR(-EBADF);
 
-
--[[linux-4.4.1/ERR_PTR()]]

         if (!is_dma_buf_file(file)) {
                 fput(file);
                 return ERR_PTR(-EINVAL);
         }
 
-
--[[linux-4.4.1/is_dma_buf_file()]]
--[[linux-4.4.1/fput()]]

         return file->private_data;
 }
 EXPORT_SYMBOL_GPL(dma_buf_get);
-
--[[linux-4.4.1/EXPORT_SYMBOL_GPL()]]


*コメント [#f75614b8]


トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS