i2c: i2c-mxs: fix 'failed to dma_request'

This commit is contained in:
Suguru Saito 2021-12-27 00:06:01 +09:00
parent 1834ea3514
commit 93549e63be
1 changed files with 6 additions and 3 deletions

View File

@ -840,9 +840,12 @@ static int mxs_i2c_probe(struct platform_device *pdev)
}
/* Setup the DMA */
i2c->dmach = dma_request_slave_channel(dev, "rx-tx");
if (!i2c->dmach) {
dev_err(dev, "Failed to request dma\n");
i2c->dmach = dma_request_chan(dev, "rx-tx");
if (IS_ERR(i2c->dmach)) {
if (i2c->dmach == -EPROBE_DEFER)
return -EPROBE_DEFER;
dev_err(dev, "Failed to request dma: %d\n", i2c->dmach);
return -ENODEV;
}