From 08b1ce100b1272ea50be5b09e20a117761c3203b Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Thu, 26 Jan 2012 12:27:25 +0100 Subject: [PATCH] --- yaml --- r: 297193 b: refs/heads/master c: 2ed9201bdd9a8e462d768a838fb2bc944c6887a4 h: refs/heads/master i: 297191: dea7b5af52c376720a64cbd02a4f27c3734ed4e0 v: v3 --- [refs] | 2 +- trunk/drivers/base/dma-buf.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index d605bc0db28e..0b2202af52e6 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a9fbc3b73127efba9276e172daa8d122f0fac1a8 +refs/heads/master: 2ed9201bdd9a8e462d768a838fb2bc944c6887a4 diff --git a/trunk/drivers/base/dma-buf.c b/trunk/drivers/base/dma-buf.c index 97450a52172c..8afe2dd17912 100644 --- a/trunk/drivers/base/dma-buf.c +++ b/trunk/drivers/base/dma-buf.c @@ -192,10 +192,11 @@ struct dma_buf_attachment *dma_buf_attach(struct dma_buf *dmabuf, if (attach == NULL) return ERR_PTR(-ENOMEM); - mutex_lock(&dmabuf->lock); - attach->dev = dev; attach->dmabuf = dmabuf; + + mutex_lock(&dmabuf->lock); + if (dmabuf->ops->attach) { ret = dmabuf->ops->attach(dmabuf, dev, attach); if (ret)