From b4b1b7eda9fe0d5a399d9095b2e8d5657726538c Mon Sep 17 00:00:00 2001 From: Axel Haslam Date: Wed, 20 Apr 2016 20:47:20 +0200 Subject: [PATCH] greybus: uart: Update line coding settings only when needed The check for line coding changed should use memcmp and not memcpy. Testing done: trivial Reviewed-by: Johan Hovold Signed-off-by: Axel Haslam Signed-off-by: Greg Kroah-Hartman --- drivers/staging/greybus/uart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/greybus/uart.c b/drivers/staging/greybus/uart.c index c580fe0..be71891 100644 --- a/drivers/staging/greybus/uart.c +++ b/drivers/staging/greybus/uart.c @@ -383,7 +383,7 @@ static void gb_tty_set_termios(struct tty_struct *tty, send_control(gb_tty, newctrl); } - if (memcpy(&gb_tty->line_coding, &newline, sizeof(newline))) { + if (memcmp(&gb_tty->line_coding, &newline, sizeof(newline))) { memcpy(&gb_tty->line_coding, &newline, sizeof(newline)); send_line_coding(gb_tty); } -- 2.7.4