lkml.org 
[lkml]   [2011]   [Feb]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Nios2-dev] [PATHV v2] tty: serial: altera_uart: Add devicetree support
On 02/17/2011 03:48 PM, Tobias Klauser wrote:
>>> + ret = altera_uart_get_of_uartclk(pdev, port);
>>> + if (ret&& platp)
>>> + port->uartclk = platp->uartclk;
>>> + else if (ret)
>>> + return ret;
>>> +
>>
>> Better reverse the priority, with platform data checked first.
>>
>> if (platp)
>> port->uartclk = platp->uartclk;
>> else {
>> ret = altera_uart_get_of_uartclk(pdev, port);
>> if (ret)
>> return ret;
>> }
>
> Do you have a specific reasoning for this? I thought it might make sense
> to do it in the same order as with the resources above, but I have no
> problem changing it to the way you suggest.

Not quite sure. But I see some drivers follow this order, and I just
followed, too.

- Thomas


\
 
 \ /
  Last update: 2011-02-18 02:31    [W:0.065 / U:0.756 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site