Skip to content

Commit

Permalink
i2c: cpm: remove casting dma_alloc
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Carmichael561 authored and Wolfram Sang committed Jul 5, 2019
1 parent 0038617 commit 998bcae
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/i2c/busses/i2c-cpm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 998bcae

Please sign in to comment.