Re: [PATCH 07/10] serial: 8250_dw: rename and comment the fallback dma filter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2015-09-15 at 13:41 +0300, Heikki Krogerus wrote:
> It needed an explanation.

Perhaps 'needs'.

Also it doesn't explain what the purpose of move the assignment in the
code.

> 
> Signed-off-by: Heikki Krogerus <heikki.krogerus@xxxxxxxxxxxxxxx>
> ---
>  drivers/tty/serial/8250/8250_dw.c | 15 ++++++++++-----
>  1 file changed, 10 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/tty/serial/8250/8250_dw.c 
> b/drivers/tty/serial/8250/8250_dw.c
> index 1ca7d75..cf405ad 100644
> --- a/drivers/tty/serial/8250/8250_dw.c
> +++ b/drivers/tty/serial/8250/8250_dw.c
> @@ -247,7 +247,15 @@ out:
>  	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;
>  }
> @@ -382,6 +390,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;
>  
> @@ -468,10 +477,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 */

-- 
Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
Intel Finland Oy
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux