Skip to content

Commit f7b87c9

Browse files
Peter UjfalusiWolfram Sang
authored andcommitted
i2c: mxs: Use dma_request_chan() instead dma_request_slave_channel()
dma_request_slave_channel() is a wrapper on top of dma_request_chan() eating up the error code. By using dma_request_chan() directly the driver can support deferred probing against DMA. Signed-off-by: Peter Ujfalusi <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
1 parent 3e566be commit f7b87c9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/i2c/busses/i2c-mxs.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -836,10 +836,10 @@ static int mxs_i2c_probe(struct platform_device *pdev)
836836
}
837837

838838
/* Setup the DMA */
839-
i2c->dmach = dma_request_slave_channel(dev, "rx-tx");
840-
if (!i2c->dmach) {
839+
i2c->dmach = dma_request_chan(dev, "rx-tx");
840+
if (IS_ERR(i2c->dmach)) {
841841
dev_err(dev, "Failed to request dma\n");
842-
return -ENODEV;
842+
return PTR_ERR(i2c->dmach);
843843
}
844844

845845
platform_set_drvdata(pdev, i2c);

0 commit comments

Comments
 (0)