From: Greg Kroah-Hartman Date: Mon, 24 Nov 2014 21:52:25 +0000 (-0800) Subject: greybus: uart-gb: clean up send_line_coding X-Git-Tag: v4.9-rc1~119^2~378^2~21^2~1819 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=9f240f20caf93090d82949d59d467dcde341560b;p=karo-tx-linux.git greybus: uart-gb: clean up send_line_coding We always pass the same option to send_line_coding() for the line_coding structure, which is already in the struct gb_tty variable, so just remove the second parameter as it's not needed. This logic came from the cdc-acm.c driver, where it's also not needed anymore, I'll go fix up that later on when I get a chance. Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/greybus/uart-gb.c b/drivers/staging/greybus/uart-gb.c index 10d00b775bf3..6432c64fbd60 100644 --- a/drivers/staging/greybus/uart-gb.c +++ b/drivers/staging/greybus/uart-gb.c @@ -180,12 +180,12 @@ static int send_data(struct gb_tty *tty, u16 size, const u8 *data) return retval; } -static int send_line_coding(struct gb_tty *tty, - struct gb_serial_line_coding *line_coding) +static int send_line_coding(struct gb_tty *tty) { struct gb_uart_set_line_coding_request request; - memcpy(&request.line_coding, line_coding, sizeof(*line_coding)); + memcpy(&request.line_coding, &tty->line_coding, + sizeof(tty->line_coding)); return gb_operation_sync(tty->connection, GB_UART_REQ_SET_LINE_CODING, &request, sizeof(request), NULL, 0); } @@ -384,7 +384,7 @@ static void gb_tty_set_termios(struct tty_struct *tty, if (memcpy(&gb_tty->line_coding, &newline, sizeof(newline))) { memcpy(&gb_tty->line_coding, &newline, sizeof(newline)); - send_line_coding(gb_tty, &gb_tty->line_coding); + send_line_coding(gb_tty); } } @@ -668,7 +668,7 @@ static int gb_uart_connection_init(struct gb_connection *connection) gb_tty->line_coding.format = GB_SERIAL_1_STOP_BITS; gb_tty->line_coding.parity = GB_SERIAL_NO_PARITY; gb_tty->line_coding.data = 8; - send_line_coding(gb_tty, &gb_tty->line_coding); + send_line_coding(gb_tty); tty_dev = tty_port_register_device(&gb_tty->port, gb_tty_driver, minor, &connection->dev);