---
name: "dma_buf_attach"
section: "9"
platform: "linux"
package: "linux-manual-3.16"
version: "3.16.56-1+deb8u1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/dma_buf_attach"
---

# dma\_buf\_attach(9)

Add the device to dma\_buf's attachments list; optionally, calls attach of dma\_buf\_ops to allow device-specific attach functionality

## NAME

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

## SYNOPSIS

**struct dma\_buf\_attachment \* dma\_buf\_attach(struct dma\_buf \*** *dmabuf***, struct device \*** *dev***);**

## ARGUMENTS

*dmabuf*

\[in\] buffer to attach device to.

*dev*

\[in\] device to be attached.

## DESCRIPTION

Returns struct dma\_buf\_attachment \* for this attachment; returns ERR\_PTR on error.

## COPYRIGHT
