forked from Minki/linux
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>
This commit is contained in:
parent
9a5382e8ff
commit
488d69ea72
@ -610,7 +610,7 @@ static void sh_mobile_i2c_xfer_dma(struct sh_mobile_i2c_data *pd)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
dma_addr = dma_map_single(chan->device->dev, pd->msg->buf, pd->msg->len, dir);
|
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");
|
dev_dbg(pd->dev, "dma map failed, using PIO\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user