Commit 1edb3cf2 authored by Heikki Krogerus's avatar Heikki Krogerus Committed by Greg Kroah-Hartman

serial: 8250_dw: rename and comment the fallback dma filter

Adding comment where the purpose of the function is
explained.

The dma parameters are not used, so removing them, and also
moving the assignment of the function to the same place
where the other dw8250_data structures members are being set
in dw8250_probe.
Signed-off-by: default avatarHeikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c73942e2
......@@ -247,7 +247,15 @@ static void dw8250_set_termios(struct uart_port *p, struct ktermios *termios,
serial8250_do_set_termios(p, termios, old);
}
static bool dw8250_dma_filter(struct dma_chan *chan, void *param)
/*
* dw8250_fallback_dma_filter will prevent the UART from getting just any free
* channel on platforms that have DMA engines, but don't have any channels
* assigned to the UART.
*
* REVISIT: This is a work around for limitation in the DMA Engine API. Once the
* core problem is fixed, this function is no longer needed.
*/
static bool dw8250_fallback_dma_filter(struct dma_chan *chan, void *param)
{
return false;
}
......@@ -374,6 +382,7 @@ static int dw8250_probe(struct platform_device *pdev)
if (!data)
return -ENOMEM;
data->dma.fn = dw8250_fallback_dma_filter;
data->usr_reg = DW_UART_USR;
p->private_data = data;
......@@ -460,10 +469,6 @@ static int dw8250_probe(struct platform_device *pdev)
if (!IS_ERR(data->rst))
reset_control_deassert(data->rst);
data->dma.rx_param = data;
data->dma.tx_param = data;
data->dma.fn = dw8250_dma_filter;
dw8250_quirks(p, data);
/* If the Busy Functionality is not implemented, don't handle it */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment