linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] i2c: sh_mobile: use proper device with dma_mapping_error
@ 2016-08-24  9:19 Wolfram Sang
  2016-08-24  9:19 ` [PATCH 2/2] i2c: rcar: " Wolfram Sang
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Wolfram Sang @ 2016-08-24  9:19 UTC (permalink / raw)
  To: linux-i2c
  Cc: linux-renesas-soc, Geert Uytterhoeven, Niklas Söderlund,
	Wolfram Sang

We must use the same device we used for mapping.

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

diff --git a/drivers/i2c/busses/i2c-sh_mobile.c b/drivers/i2c/busses/i2c-sh_mobile.c
index 6fb3e264599229..05b1eeab9cf5f6 100644
--- a/drivers/i2c/busses/i2c-sh_mobile.c
+++ b/drivers/i2c/busses/i2c-sh_mobile.c
@@ -610,7 +610,7 @@ static void sh_mobile_i2c_xfer_dma(struct sh_mobile_i2c_data *pd)
 		return;
 
 	dma_addr = dma_map_single(chan->device->dev, pd->msg->buf, pd->msg->len, dir);
-	if (dma_mapping_error(pd->dev, dma_addr)) {
+	if (dma_mapping_error(chan->device->dev, dma_addr)) {
 		dev_dbg(pd->dev, "dma map failed, using PIO\n");
 		return;
 	}
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-08-25 16:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH 2/2] i2c: rcar: " Wolfram Sang
2016-08-25  7:59   ` 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

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).