Lines Matching defs:attach

53 	struct dma_buf_attachment *attach;
1586 struct dma_buf_attachment *attach = priv->attach;
1588 struct dma_buf *dmabuf = attach->dmabuf;
1590 dma_buf_unmap_attachment_unlocked(attach, priv->sgt, priv->dir);
1594 dma_buf_detach(attach->dmabuf, attach);
1599 static void iio_buffer_dmabuf_get(struct dma_buf_attachment *attach)
1601 struct iio_dmabuf_priv *priv = attach->importer_priv;
1606 static void iio_buffer_dmabuf_put(struct dma_buf_attachment *attach)
1608 struct iio_dmabuf_priv *priv = attach->importer_priv;
1627 iio_buffer_dmabuf_put(priv->attach);
1663 struct dma_buf_attachment *attach = NULL;
1669 if (priv->attach->dev == dma_dev
1670 && priv->attach->dmabuf == dmabuf) {
1671 attach = priv->attach;
1676 if (attach)
1677 iio_buffer_dmabuf_get(attach);
1679 return attach ?: ERR_PTR(-EPERM);
1688 struct dma_buf_attachment *attach;
1714 attach = dma_buf_attach(dmabuf, dma_dev);
1715 if (IS_ERR(attach)) {
1716 err = PTR_ERR(attach);
1727 priv->sgt = dma_buf_map_attachment(attach, priv->dir);
1736 priv->attach = attach;
1737 attach->importer_priv = priv;
1739 priv->block = buffer->access->attach_dmabuf(buffer, attach);
1751 * combo. If we do, refuse to attach.
1754 if (each->attach->dev == dma_dev
1755 && each->attach->dmabuf == dmabuf) {
1763 iio_buffer_dmabuf_put(attach);
1775 dma_buf_unmap_attachment(attach, priv->sgt, priv->dir);
1779 dma_buf_detach(dmabuf, attach);
1808 if (priv->attach->dev == dma_dev
1809 && priv->attach->dmabuf == dmabuf) {
1813 iio_buffer_dmabuf_put(priv->attach);
1850 struct dma_buf_attachment *attach;
1881 attach = iio_buffer_find_attachment(ib, dmabuf, nonblock);
1882 if (IS_ERR(attach)) {
1883 ret = PTR_ERR(attach);
1887 priv = attach->importer_priv;
1966 iio_buffer_dmabuf_put(attach);
1978 struct dma_buf_attachment *attach = priv->attach;
1981 iio_buffer_dmabuf_put(attach);
2526 * @buffer: The buffer to attach to the device
2552 /* first buffer is legacy; attach it to the IIO device directly */