提交 7464779f 编写于 作者: A Andy Lowe 提交者: Greg Kroah-Hartman

serial: sh-sci: suppress warning for ports without dma channels

If a port has no dma channel defined in the device tree, then
don't attempt to allocate a dma channel for the port.
Also suppress the warning message concerning the failure to allocate
a dma channel.  Continue to emit the warning message if a dma
channel is defined but cannot be allocated.
Signed-off-by: NAndy Lowe <andy_lowe@mentor.com>
Signed-off-by: NEugeniu Rosca <erosca@de.adit-jv.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 daf3930c
......@@ -1506,6 +1506,14 @@ static void sci_request_dma(struct uart_port *port)
return;
s->cookie_tx = -EINVAL;
/*
* Don't request a dma channel if no channel was specified
* in the device tree.
*/
if (!of_find_property(port->dev->of_node, "dmas", NULL))
return;
chan = sci_request_dma_chan(port, DMA_MEM_TO_DEV);
dev_dbg(port->dev, "%s: TX: got channel %p\n", __func__, chan);
if (chan) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册