提交 f7b87c9a 编写于 作者: P Peter Ujfalusi 提交者: Wolfram Sang

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: NPeter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
上级 3e566bee
......@@ -836,10 +836,10 @@ static int mxs_i2c_probe(struct platform_device *pdev)
}
/* Setup the DMA */
i2c->dmach = dma_request_slave_channel(dev, "rx-tx");
if (!i2c->dmach) {
i2c->dmach = dma_request_chan(dev, "rx-tx");
if (IS_ERR(i2c->dmach)) {
dev_err(dev, "Failed to request dma\n");
return -ENODEV;
return PTR_ERR(i2c->dmach);
}
platform_set_drvdata(pdev, i2c);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册