struct mutex mutex;
u8 version_major;
u8 version_minor;
- unsigned int ctrlin; /* input control lines */
- unsigned int ctrlout; /* output control lines */
+ u8 ctrlin; /* input control lines */
+ u8 ctrlout; /* output control lines */
struct gb_tty_line_coding line_coding;
};
break;
case GB_UART_TYPE_SERIAL_STATE:
serial_state = request->payload;
- gb_tty->ctrlin = le16_to_cpu(serial_state->control);
+ gb_tty->ctrlin = serial_state->control;
break;
default:
dev_err(&connection->dev,
&request, sizeof(request), NULL, 0);
}
-static int send_control(struct gb_tty *gb_tty, u16 control)
+static int send_control(struct gb_tty *gb_tty, u8 control)
{
struct gb_uart_set_control_line_state_request request;
- request.control = cpu_to_le16(control);
+ request.control = control;
return gb_operation_sync(gb_tty->connection,
GB_UART_TYPE_SET_CONTROL_LINE_STATE,
&request, sizeof(request), NULL, 0);
struct gb_tty *gb_tty = tty->driver_data;
struct ktermios *termios = &tty->termios;
struct gb_tty_line_coding newline;
- int newctrl = gb_tty->ctrlout;
+ u8 newctrl = gb_tty->ctrlout;
newline.rate = cpu_to_le32(tty_get_baud_rate(tty));
newline.format = termios->c_cflag & CSTOPB ?
unsigned int clear)
{
struct gb_tty *gb_tty = tty->driver_data;
- unsigned int newctrl = gb_tty->ctrlout;
+ u8 newctrl = gb_tty->ctrlout;
set = (set & TIOCM_DTR ? GB_UART_CTRL_DTR : 0) |
(set & TIOCM_RTS ? GB_UART_CTRL_RTS : 0);