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-Tag: v4.9-rc1~119^2~378^2~21^2~515 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=b4b1b7eda9fe0d5a399d9095b2e8d5657726538c;p=linux.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); }