Re: [PATCH] tty/serial_core: Introduce lock mechanism for RS485

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

 



On 13/10/2014 21:03, Ricardo Ribalda Delgado :
> Hello Nicolas
> 
>>
>> I have the feeling that moving the code chunk that uses this new
>> variable (rs485_enabled) here ...
>>
>>>       ret = uart_add_one_port(&atmel_uart, &port->uart);
>>>       if (ret)
>>>               goto err_add_port;
>>> @@ -2574,7 +2572,7 @@ static int atmel_serial_probe(struct platform_device *pdev)
>>>       device_init_wakeup(&pdev->dev, 1);
>>>       platform_set_drvdata(pdev, port);
>>>
>>> -     if (port->uart.rs485.flags & SER_RS485_ENABLED) {
>>> +     if (rs485_enabled) {
>>>               UART_PUT_MR(&port->uart, ATMEL_US_USMODE_NORMAL);
>>>               UART_PUT_CR(&port->uart, ATMEL_US_RTSEN);
>>>       }
>>
>> ... (this one ^^^) up where you can test the SER_RS485_ENABLED, can be
>> even simpler.
>>
>> otherwise, it seems good so you can add my:
>>
>> Acked-by: Nicolas Ferre <nicolas.ferre@xxxxxxxxx>
>>
>> Thanks.
> 
> I supposed that the code needs to be initialized with rs485 disabled
> and then enable it. Also I did not want to change the behaviour a
> driver in a patch that involves 3 other drivers. If you don't mind I
> prefer that this is added to a separated patch.

Fair enough, I can do it later on.

Thanks, bye,
-- 
Nicolas Ferre
--
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