dma_buf_attach —
Add the device to dma_buf's attachments list; optionally, calls attach
of dma_buf_ops to allow device-specific attach functionality
struct dma_buf_attachment * dma_buf_attach ( | struct dma_buf * dmabuf, |
struct device * dev) ; |
Returns struct dma_buf_attachment pointer for this attachment. Attachments
must be cleaned up by calling dma_buf_detach
.
A pointer to newly created dma_buf_attachment on success, or a negative error code wrapped into a pointer on failure.
Note that this can fail if the backing storage of dmabuf
is in a place not
accessible to dev
, and cannot be moved to a more suitable place. This is
indicated with the error code -EBUSY.