mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-06 08:46:46 +00:00
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 <johan@hovoldconsulting.com> Signed-off-by: Axel Haslam <ahaslam@baylibre.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
parent
41d514020f
commit
b4b1b7eda9
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue