diff options
author | Axel Haslam <ahaslam@baylibre.com> | 2016-04-20 20:47:20 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2016-04-21 10:33:47 +0900 |
commit | b4b1b7eda9fe0d5a399d9095b2e8d5657726538c (patch) | |
tree | c664e733a85e9bd206bd872518c693206e9dfa7d /drivers/staging/greybus/uart.c | |
parent | 41d514020f4844905f349cd51476d03db254317a (diff) |
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>
Diffstat (limited to 'drivers/staging/greybus/uart.c')
-rw-r--r-- | drivers/staging/greybus/uart.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); } |