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);
}
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);
}
}
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);