diff options
author | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2016-08-24 11:19:28 +0200 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2016-08-25 18:48:12 +0200 |
commit | 488d69ea72457c7566b36eb0d484d579f19963c5 (patch) | |
tree | 7f1e6381aecfd00442c0bd0066d04cfb3ff4ac87 /drivers/i2c/busses/i2c-sh_mobile.c | |
parent | 9a5382e8ffe86412f442f6a34fde43f94aae530b (diff) | |
download | op-kernel-dev-488d69ea72457c7566b36eb0d484d579f19963c5.zip op-kernel-dev-488d69ea72457c7566b36eb0d484d579f19963c5.tar.gz |
i2c: sh_mobile: 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>
Diffstat (limited to 'drivers/i2c/busses/i2c-sh_mobile.c')
-rw-r--r-- | drivers/i2c/busses/i2c-sh_mobile.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-sh_mobile.c b/drivers/i2c/busses/i2c-sh_mobile.c index 6fb3e26..05b1eea 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; } |