Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a19741e5 authored by Christian König's avatar Christian König Committed by Christian König
Browse files

dma_buf: remove device parameter from attach callback v2



The device parameter is completely unused because it is available in the
attachment structure as well.

v2: fix kerneldoc as well

Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/226643/
parent 2227a7a2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -568,7 +568,7 @@ struct dma_buf_attachment *dma_buf_attach(struct dma_buf *dmabuf,
	mutex_lock(&dmabuf->lock);

	if (dmabuf->ops->attach) {
		ret = dmabuf->ops->attach(dmabuf, dev, attach);
		ret = dmabuf->ops->attach(dmabuf, attach);
		if (ret)
			goto err_attach;
	}
+1 −2
Original line number Diff line number Diff line
@@ -127,7 +127,6 @@ amdgpu_gem_prime_import_sg_table(struct drm_device *dev,
}

static int amdgpu_gem_map_attach(struct dma_buf *dma_buf,
				 struct device *target_dev,
				 struct dma_buf_attachment *attach)
{
	struct drm_gem_object *obj = dma_buf->priv;
@@ -135,7 +134,7 @@ static int amdgpu_gem_map_attach(struct dma_buf *dma_buf,
	struct amdgpu_device *adev = amdgpu_ttm_adev(bo->tbo.bdev);
	long r;

	r = drm_gem_map_attach(dma_buf, target_dev, attach);
	r = drm_gem_map_attach(dma_buf, attach);
	if (r)
		return r;

+1 −2
Original line number Diff line number Diff line
@@ -186,7 +186,6 @@ static int drm_prime_lookup_buf_handle(struct drm_prime_file_private *prime_fpri
/**
 * drm_gem_map_attach - dma_buf attach implementation for GEM
 * @dma_buf: buffer to attach device to
 * @target_dev: not used
 * @attach: buffer attachment data
 *
 * Allocates &drm_prime_attachment and calls &drm_driver.gem_prime_pin for
@@ -195,7 +194,7 @@ static int drm_prime_lookup_buf_handle(struct drm_prime_file_private *prime_fpri
 *
 * Returns 0 on success, negative error code on failure.
 */
int drm_gem_map_attach(struct dma_buf *dma_buf, struct device *target_dev,
int drm_gem_map_attach(struct dma_buf *dma_buf,
		       struct dma_buf_attachment *attach)
{
	struct drm_prime_attachment *prime_attach;
+0 −1
Original line number Diff line number Diff line
@@ -29,7 +29,6 @@ struct udl_drm_dmabuf_attachment {
};

static int udl_attach_dma_buf(struct dma_buf *dmabuf,
			      struct device *dev,
			      struct dma_buf_attachment *attach)
{
	struct udl_drm_dmabuf_attachment *udl_attach;
+0 −1
Original line number Diff line number Diff line
@@ -40,7 +40,6 @@
 */

static int vmw_prime_map_attach(struct dma_buf *dma_buf,
				struct device *target_dev,
				struct dma_buf_attachment *attach)
{
	return -ENOSYS;
Loading