*参照元 [#j41d72a1] #backlinks *説明 [#w8e8b353] -パス: [[linux-4.4.1/drivers/dma-buf/dma-buf.c]] -FIXME: これは何? --説明 **引数 [#dda0f5ff] -struct dma_buf *dmabuf -- --[[linux-4.4.1/dma_buf]] -struct dma_buf_attachment *attach -- --[[linux-4.4.1/dma_buf_attachment]] **返り値 [#lb6df31b] -なし **参考 [#m86c04e3] *実装 [#ia0f87b8] /** * dma_buf_detach - Remove the given attachment from dmabuf's attachments list; * optionally calls detach() of dma_buf_ops for device-specific detach * @dmabuf: [in] buffer to detach from. * @attach: [in] attachment to be detached; is free'd after this call. * */ void dma_buf_detach(struct dma_buf *dmabuf, struct dma_buf_attachment *attach) { if (WARN_ON(!dmabuf || !attach)) return; - --[[linux-4.4.1/WARN_ON()]] mutex_lock(&dmabuf->lock); list_del(&attach->node); if (dmabuf->ops->detach) dmabuf->ops->detach(dmabuf, attach); - --[[linux-4.4.1/mutex_lock()]] --[[linux-4.4.1/list_del()]] -dmabuf->ops は 型 --[[linux-4.4.1/]] -dmabuf->ops は const struct dma_buf_ops * 型 --[[linux-4.4.1/dma_buf_ops]] mutex_unlock(&dmabuf->lock); kfree(attach); - --[[linux-4.4.1/mutex_unlock()]] --[[linux-4.4.1/kfree()]] } EXPORT_SYMBOL_GPL(dma_buf_detach); - --[[linux-4.4.1/EXPORT_SYMBOL_GPL()]] *コメント [#z552e01e]