summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWolfram Sang <wsa+renesas@sang-engineering.com>2016-08-24 11:19:29 +0200
committerWolfram Sang <wsa@the-dreams.de>2016-08-25 18:48:47 +0200
commitc13c29186c59b056d6ec141b5967c2ca3efc0c16 (patch)
treea8ef50037c2265fc5aada36ac153405314c48d87
parent488d69ea72457c7566b36eb0d484d579f19963c5 (diff)
downloadlinux-c13c29186c59b056d6ec141b5967c2ca3efc0c16.tar.bz2
i2c: rcar: use proper device with dma_mapping_error
We must use the same device we used for mapping. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
-rw-r--r--drivers/i2c/busses/i2c-rcar.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c
index 52407f3c9e1c..9bd849dacee8 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;
}