Commit b4b1b7ed authored by Axel Haslam's avatar Axel Haslam Committed by Greg Kroah-Hartman

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: default avatarJohan Hovold <johan@hovoldconsulting.com>
Signed-off-by: default avatarAxel Haslam <ahaslam@baylibre.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 41d51402
......@@ -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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment