From: Axel Haslam Date: Wed, 20 Apr 2016 18:47:20 +0000 (+0200) Subject: greybus: uart: Update line coding settings only when needed X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b4b1b7eda9fe0d5a399d9095b2e8d5657726538c;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 --- diff --git a/drivers/staging/greybus/uart.c b/drivers/staging/greybus/uart.c index c580fe06f554..be718918c135 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); }