]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Merge branch 'i2c/for-current-fixed' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 19 Jun 2017 00:20:25 +0000 (09:20 +0900)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 19 Jun 2017 00:20:25 +0000 (09:20 +0900)
Pull i2c fixes from Wolfram Sang:
 "Two driver bugfixes"

* 'i2c/for-current-fixed' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
  i2c: ismt: fix wrong device address when unmap the data buffer
  i2c: rcar: use correct length when unmapping DMA

drivers/i2c/busses/i2c-ismt.c
drivers/i2c/busses/i2c-rcar.c

index f573448d2132161d4839a17d11afb1c1f4104188..e98e44e584a44a6e17dc3af00ae1f02ce50ae95b 100644 (file)
@@ -584,7 +584,7 @@ static int ismt_access(struct i2c_adapter *adap, u16 addr,
 
        /* unmap the data buffer */
        if (dma_size != 0)
-               dma_unmap_single(&adap->dev, dma_addr, dma_size, dma_direction);
+               dma_unmap_single(dev, dma_addr, dma_size, dma_direction);
 
        if (unlikely(!time_left)) {
                dev_err(dev, "completion wait timed out\n");
index 214bf2835d1f95ff176cb0ded24654b20b821944..8be3e6cb8fe686a02b62eb1b699a1763e0186df5 100644 (file)
@@ -319,7 +319,7 @@ static void rcar_i2c_dma_unmap(struct rcar_i2c_priv *priv)
        rcar_i2c_write(priv, ICFBSCR, TCYC06);
 
        dma_unmap_single(chan->device->dev, sg_dma_address(&priv->sg),
-                        priv->msg->len, priv->dma_direction);
+                        sg_dma_len(&priv->sg), priv->dma_direction);
 
        priv->dma_direction = DMA_NONE;
 }