OSDN Git Service

i2c: cpm: remove casting dma_alloc
authorVasyl Gomonovych <gomonovych@gmail.com>
Sun, 23 Jun 2019 21:13:53 +0000 (23:13 +0200)
committerWolfram Sang <wsa@the-dreams.de>
Fri, 5 Jul 2019 18:59:35 +0000 (20:59 +0200)
Generated by:  alloc_cast.cocci

Signed-off-by: Vasyl Gomonovych <gomonovych@gmail.com>
Acked-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-cpm.c

index 8a8ca94..72b539c 100644 (file)
@@ -540,7 +540,9 @@ static int cpm_i2c_setup(struct cpm_i2c *cpm)
                }
                out_be32(&rbdf[i].cbd_bufaddr, ((cpm->rxdma[i] + 1) & ~1));
 
-               cpm->txbuf[i] = (unsigned char *)dma_alloc_coherent(&cpm->ofdev->dev, CPM_MAX_READ + 1, &cpm->txdma[i], GFP_KERNEL);
+               cpm->txbuf[i] = dma_alloc_coherent(&cpm->ofdev->dev,
+                                                  CPM_MAX_READ + 1,
+                                                  &cpm->txdma[i], GFP_KERNEL);
                if (!cpm->txbuf[i]) {
                        ret = -ENOMEM;
                        goto out_muram;