linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: linux-i2c@vger.kernel.org
Cc: linux-renesas-soc@vger.kernel.org,
	"Geert Uytterhoeven" <geert@linux-m68k.org>,
	"Niklas Söderlund" <niklas.soderlund@ragnatech.se>,
	"Wolfram Sang" <wsa+renesas@sang-engineering.com>
Subject: [PATCH 2/2] i2c: rcar: use proper device with dma_mapping_error
Date: Wed, 24 Aug 2016 11:19:29 +0200	[thread overview]
Message-ID: <20160824091929.2082-2-wsa+renesas@sang-engineering.com> (raw)
In-Reply-To: <20160824091929.2082-1-wsa+renesas@sang-engineering.com>

We must use the same device we used for mapping.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 drivers/i2c/busses/i2c-rcar.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c
index 52407f3c9e1cce..9bd849dacee872 100644
--- a/drivers/i2c/busses/i2c-rcar.c
+++ b/drivers/i2c/busses/i2c-rcar.c
@@ -378,7 +378,7 @@ static void rcar_i2c_dma(struct rcar_i2c_priv *priv)
 	}
 
 	dma_addr = dma_map_single(chan->device->dev, buf, len, dir);
-	if (dma_mapping_error(dev, dma_addr)) {
+	if (dma_mapping_error(chan->device->dev, dma_addr)) {
 		dev_dbg(dev, "dma map failed, using PIO\n");
 		return;
 	}
-- 
2.9.3

  reply	other threads:[~2016-08-24  9:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-24  9:19 [PATCH 1/2] i2c: sh_mobile: use proper device with dma_mapping_error Wolfram Sang
2016-08-24  9:19 ` Wolfram Sang [this message]
2016-08-25  7:59   ` [PATCH 2/2] i2c: rcar: " Geert Uytterhoeven
2016-08-25 16:50   ` Wolfram Sang
2016-08-25  7:59 ` [PATCH 1/2] i2c: sh_mobile: " Geert Uytterhoeven
2016-08-25 16:50 ` Wolfram Sang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160824091929.2082-2-wsa+renesas@sang-engineering.com \
    --to=wsa+renesas@sang-engineering.com \
    --cc=geert@linux-m68k.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=niklas.soderlund@ragnatech.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).