* [PATCH 1/2] serial: at91, fix rs485 properties
@ 2015-10-11 13:22 Jiri Slaby
2015-10-11 13:22 ` [PATCH 2/2] tty: synclink, fix indentation Jiri Slaby
0 siblings, 1 reply; 2+ messages in thread
From: Jiri Slaby @ 2015-10-11 13:22 UTC (permalink / raw)
To: gregkh; +Cc: linux-serial, linux-kernel, Jiri Slaby, Elen Song
There is a misplaced bracket in atmel_init_rs485 which sets
rs485-rx-during-tx and rs485-enabled-at-boot-time only if
rs485-rts-delay is set in of.
This is clearly a bug, so fix it by moving the bracket to the proper
place.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Elen Song <elen.song@atmel.com>
---
drivers/tty/serial/atmel_serial.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
index 473538ebbe8c..ad3e5768aab1 100644
--- a/drivers/tty/serial/atmel_serial.c
+++ b/drivers/tty/serial/atmel_serial.c
@@ -1682,15 +1682,15 @@ static void atmel_init_rs485(struct uart_port *port,
struct atmel_uart_data *pdata = dev_get_platdata(&pdev->dev);
if (np) {
+ struct serial_rs485 *rs485conf = &port->rs485;
u32 rs485_delay[2];
/* rs485 properties */
if (of_property_read_u32_array(np, "rs485-rts-delay",
rs485_delay, 2) == 0) {
- struct serial_rs485 *rs485conf = &port->rs485;
-
rs485conf->delay_rts_before_send = rs485_delay[0];
rs485conf->delay_rts_after_send = rs485_delay[1];
rs485conf->flags = 0;
+ }
if (of_get_property(np, "rs485-rx-during-tx", NULL))
rs485conf->flags |= SER_RS485_RX_DURING_TX;
@@ -1698,7 +1698,6 @@ static void atmel_init_rs485(struct uart_port *port,
if (of_get_property(np, "linux,rs485-enabled-at-boot-time",
NULL))
rs485conf->flags |= SER_RS485_ENABLED;
- }
} else {
port->rs485 = pdata->rs485;
}
--
2.6.1
^ permalink raw reply [flat|nested] 2+ messages in thread* [PATCH 2/2] tty: synclink, fix indentation
2015-10-11 13:22 [PATCH 1/2] serial: at91, fix rs485 properties Jiri Slaby
@ 2015-10-11 13:22 ` Jiri Slaby
0 siblings, 0 replies; 2+ messages in thread
From: Jiri Slaby @ 2015-10-11 13:22 UTC (permalink / raw)
To: gregkh; +Cc: linux-serial, linux-kernel, Jiri Slaby
The statement after if should be indenteted. So fix this.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
drivers/tty/synclink.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/synclink.c b/drivers/tty/synclink.c
index 701dd4e3446d..97ad9df048b5 100644
--- a/drivers/tty/synclink.c
+++ b/drivers/tty/synclink.c
@@ -6633,7 +6633,7 @@ static bool mgsl_get_rx_frame(struct mgsl_struct *info)
unsigned char *ptmp = info->intermediate_rxbuffer;
if ( !(status & RXSTATUS_CRC_ERROR))
- info->icount.rxok++;
+ info->icount.rxok++;
while(copy_count) {
int partial_count;
--
2.6.1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-10-11 13:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-11 13:22 [PATCH 1/2] serial: at91, fix rs485 properties Jiri Slaby
2015-10-11 13:22 ` [PATCH 2/2] tty: synclink, fix indentation Jiri Slaby
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®