usb: serial: Make ->set_termios() old ktermios const
There should be no reason to adjust old ktermios which is going to get discarded anyway. Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Link: https://lore.kernel.org/r/20220816115739.10928-8-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
bec5b814d4
commit
f6d47fe592
@ -189,7 +189,7 @@ static void ark3116_port_remove(struct usb_serial_port *port)
|
||||
|
||||
static void ark3116_set_termios(struct tty_struct *tty,
|
||||
struct usb_serial_port *port,
|
||||
struct ktermios *old_termios)
|
||||
const struct ktermios *old_termios)
|
||||
{
|
||||
struct usb_serial *serial = port->serial;
|
||||
struct ark3116_private *priv = usb_get_serial_port_data(port);
|
||||
|
@ -44,7 +44,8 @@ static void belkin_sa_close(struct usb_serial_port *port);
|
||||
static void belkin_sa_read_int_callback(struct urb *urb);
|
||||
static void belkin_sa_process_read_urb(struct urb *urb);
|
||||
static void belkin_sa_set_termios(struct tty_struct *tty,
|
||||
struct usb_serial_port *port, struct ktermios * old);
|
||||
struct usb_serial_port *port,
|
||||
const struct ktermios *old_termios);
|
||||
static void belkin_sa_break_ctl(struct tty_struct *tty, int break_state);
|
||||
static int belkin_sa_tiocmget(struct tty_struct *tty);
|
||||
static int belkin_sa_tiocmset(struct tty_struct *tty,
|
||||
@ -273,7 +274,8 @@ static void belkin_sa_process_read_urb(struct urb *urb)
|
||||
}
|
||||
|
||||
static void belkin_sa_set_termios(struct tty_struct *tty,
|
||||
struct usb_serial_port *port, struct ktermios *old_termios)
|
||||
struct usb_serial_port *port,
|
||||
const struct ktermios *old_termios)
|
||||
{
|
||||
struct usb_serial *serial = port->serial;
|
||||
struct belkin_sa_private *priv = usb_get_serial_port_data(port);
|
||||
|
@ -103,7 +103,7 @@ struct ch341_private {
|
||||
|
||||
static void ch341_set_termios(struct tty_struct *tty,
|
||||
struct usb_serial_port *port,
|
||||
struct ktermios *old_termios);
|
||||
const struct ktermios *old_termios);
|
||||
|
||||
static int ch341_control_out(struct usb_device *dev, u8 request,
|
||||
u16 value, u16 index)
|
||||
@ -470,7 +470,8 @@ static int ch341_open(struct tty_struct *tty, struct usb_serial_port *port)
|
||||
* tty->termios contains the new setting to be used.
|
||||
*/
|
||||
static void ch341_set_termios(struct tty_struct *tty,
|
||||
struct usb_serial_port *port, struct ktermios *old_termios)
|
||||
struct usb_serial_port *port,
|
||||
const struct ktermios *old_termios)
|
||||
{
|
||||
struct ch341_private *priv = usb_get_serial_port_data(port);
|
||||
unsigned baud_rate;
|
||||
|
@ -31,9 +31,9 @@
|
||||
static int cp210x_open(struct tty_struct *tty, struct usb_serial_port *);
|
||||
static void cp210x_close(struct usb_serial_port *);
|
||||
static void cp210x_change_speed(struct tty_struct *, struct usb_serial_port *,
|
||||
struct ktermios *);
|
||||
const struct ktermios *);
|
||||
static void cp210x_set_termios(struct tty_struct *, struct usb_serial_port *,
|
||||
struct ktermios*);
|
||||
const struct ktermios *);
|
||||
static bool cp210x_tx_empty(struct usb_serial_port *port);
|
||||
static int cp210x_tiocmget(struct tty_struct *);
|
||||
static int cp210x_tiocmset(struct tty_struct *, unsigned int, unsigned int);
|
||||
@ -1039,7 +1039,8 @@ static speed_t cp210x_get_actual_rate(speed_t baud)
|
||||
* otherwise.
|
||||
*/
|
||||
static void cp210x_change_speed(struct tty_struct *tty,
|
||||
struct usb_serial_port *port, struct ktermios *old_termios)
|
||||
struct usb_serial_port *port,
|
||||
const struct ktermios *old_termios)
|
||||
{
|
||||
struct usb_serial *serial = port->serial;
|
||||
struct cp210x_serial_private *priv = usb_get_serial_data(serial);
|
||||
@ -1121,7 +1122,8 @@ static bool cp210x_termios_change(const struct ktermios *a, const struct ktermio
|
||||
}
|
||||
|
||||
static void cp210x_set_flow_control(struct tty_struct *tty,
|
||||
struct usb_serial_port *port, struct ktermios *old_termios)
|
||||
struct usb_serial_port *port,
|
||||
const struct ktermios *old_termios)
|
||||
{
|
||||
struct cp210x_serial_private *priv = usb_get_serial_data(port->serial);
|
||||
struct cp210x_port_private *port_priv = usb_get_serial_port_data(port);
|
||||
@ -1231,7 +1233,8 @@ static void cp210x_set_flow_control(struct tty_struct *tty,
|
||||
}
|
||||
|
||||
static void cp210x_set_termios(struct tty_struct *tty,
|
||||
struct usb_serial_port *port, struct ktermios *old_termios)
|
||||
struct usb_serial_port *port,
|
||||
const struct ktermios *old_termios)
|
||||
{
|
||||
struct cp210x_serial_private *priv = usb_get_serial_data(port->serial);
|
||||
u16 bits;
|
||||
|
@ -125,7 +125,8 @@ static void cypress_send(struct usb_serial_port *port);
|
||||
static unsigned int cypress_write_room(struct tty_struct *tty);
|
||||
static void cypress_earthmate_init_termios(struct tty_struct *tty);
|
||||
static void cypress_set_termios(struct tty_struct *tty,
|
||||
struct usb_serial_port *port, struct ktermios *old);
|
||||
struct usb_serial_port *port,
|
||||
const struct ktermios *old_termios);
|
||||
static int cypress_tiocmget(struct tty_struct *tty);
|
||||
static int cypress_tiocmset(struct tty_struct *tty,
|
||||
unsigned int set, unsigned int clear);
|
||||
@ -859,7 +860,8 @@ static void cypress_earthmate_init_termios(struct tty_struct *tty)
|
||||
}
|
||||
|
||||
static void cypress_set_termios(struct tty_struct *tty,
|
||||
struct usb_serial_port *port, struct ktermios *old_termios)
|
||||
struct usb_serial_port *port,
|
||||
const struct ktermios *old_termios)
|
||||
{
|
||||
struct cypress_private *priv = usb_get_serial_port_data(port);
|
||||
struct device *dev = &port->dev;
|
||||
|
@ -215,7 +215,8 @@ static int digi_transmit_idle(struct usb_serial_port *port,
|
||||
static void digi_rx_throttle(struct tty_struct *tty);
|
||||
static void digi_rx_unthrottle(struct tty_struct *tty);
|
||||
static void digi_set_termios(struct tty_struct *tty,
|
||||
struct usb_serial_port *port, struct ktermios *old_termios);
|
||||
struct usb_serial_port *port,
|
||||
const struct ktermios *old_termios);
|
||||
static void digi_break_ctl(struct tty_struct *tty, int break_state);
|
||||
static int digi_tiocmget(struct tty_struct *tty);
|
||||
static int digi_tiocmset(struct tty_struct *tty, unsigned int set,
|
||||
@ -649,7 +650,8 @@ static void digi_rx_unthrottle(struct tty_struct *tty)
|
||||
|
||||
|
||||
static void digi_set_termios(struct tty_struct *tty,
|
||||
struct usb_serial_port *port, struct ktermios *old_termios)
|
||||
struct usb_serial_port *port,
|
||||
const struct ktermios *old_termios)
|
||||
{
|
||||
struct digi_port *priv = usb_get_serial_port_data(port);
|
||||
struct device *dev = &port->dev;
|
||||
|
@ -603,7 +603,8 @@ static int f81232_port_disable(struct usb_serial_port *port)
|
||||
}
|
||||
|
||||
static void f81232_set_termios(struct tty_struct *tty,
|
||||
struct usb_serial_port *port, struct ktermios *old_termios)
|
||||
struct usb_serial_port *port,
|
||||
const struct ktermios *old_termios)
|
||||
{
|
||||
struct f81232_private *priv = usb_get_serial_port_data(port);
|
||||
u8 new_lcr = 0;
|
||||
|
@ -944,8 +944,8 @@ static int f81534_calc_num_ports(struct usb_serial *serial,
|
||||
}
|
||||
|
||||
static void f81534_set_termios(struct tty_struct *tty,
|
||||
struct usb_serial_port *port,
|
||||
struct ktermios *old_termios)
|
||||
struct usb_serial_port *port,
|
||||
const struct ktermios *old_termios)
|
||||
{
|
||||
u8 new_lcr = 0;
|
||||
int status;
|
||||
|
@ -1087,7 +1087,8 @@ static void ftdi_process_read_urb(struct urb *urb);
|
||||
static int ftdi_prepare_write_buffer(struct usb_serial_port *port,
|
||||
void *dest, size_t size);
|
||||
static void ftdi_set_termios(struct tty_struct *tty,
|
||||
struct usb_serial_port *port, struct ktermios *old);
|
||||
struct usb_serial_port *port,
|
||||
const struct ktermios *old_termios);
|
||||
static int ftdi_tiocmget(struct tty_struct *tty);
|
||||
static int ftdi_tiocmset(struct tty_struct *tty,
|
||||
unsigned int set, unsigned int clear);
|
||||
@ -2638,7 +2639,8 @@ static bool ftdi_tx_empty(struct usb_serial_port *port)
|
||||
* WARNING: set_termios calls this with old_termios in kernel space
|
||||
*/
|
||||
static void ftdi_set_termios(struct tty_struct *tty,
|
||||
struct usb_serial_port *port, struct ktermios *old_termios)
|
||||
struct usb_serial_port *port,
|
||||
const struct ktermios *old_termios)
|
||||
{
|
||||
struct usb_device *dev = port->serial->dev;
|
||||
struct device *ddev = &port->dev;
|
||||
|
@ -281,7 +281,7 @@ static int send_iosp_ext_cmd(struct edgeport_port *edge_port, __u8 command,
|
||||
static int calc_baud_rate_divisor(struct device *dev, int baud_rate, int *divisor);
|
||||
static void change_port_settings(struct tty_struct *tty,
|
||||
struct edgeport_port *edge_port,
|
||||
struct ktermios *old_termios);
|
||||
const struct ktermios *old_termios);
|
||||
static int send_cmd_write_uart_register(struct edgeport_port *edge_port,
|
||||
__u8 regNum, __u8 regValue);
|
||||
static int write_cmd_usb(struct edgeport_port *edge_port,
|
||||
@ -1441,7 +1441,8 @@ static void edge_unthrottle(struct tty_struct *tty)
|
||||
* the termios structure
|
||||
*****************************************************************************/
|
||||
static void edge_set_termios(struct tty_struct *tty,
|
||||
struct usb_serial_port *port, struct ktermios *old_termios)
|
||||
struct usb_serial_port *port,
|
||||
const struct ktermios *old_termios)
|
||||
{
|
||||
struct edgeport_port *edge_port = usb_get_serial_port_data(port);
|
||||
|
||||
@ -2325,7 +2326,7 @@ static int send_cmd_write_uart_register(struct edgeport_port *edge_port,
|
||||
*****************************************************************************/
|
||||
|
||||
static void change_port_settings(struct tty_struct *tty,
|
||||
struct edgeport_port *edge_port, struct ktermios *old_termios)
|
||||
struct edgeport_port *edge_port, const struct ktermios *old_termios)
|
||||
{
|
||||
struct device *dev = &edge_port->port->dev;
|
||||
struct edgeport_serial *edge_serial =
|
||||
|
@ -221,7 +221,8 @@ static void stop_read(struct edgeport_port *edge_port);
|
||||
static int restart_read(struct edgeport_port *edge_port);
|
||||
|
||||
static void edge_set_termios(struct tty_struct *tty,
|
||||
struct usb_serial_port *port, struct ktermios *old_termios);
|
||||
struct usb_serial_port *port,
|
||||
const struct ktermios *old_termios);
|
||||
static void edge_send(struct usb_serial_port *port, struct tty_struct *tty);
|
||||
|
||||
static int do_download_mode(struct edgeport_serial *serial,
|
||||
@ -2210,7 +2211,7 @@ static int restart_read(struct edgeport_port *edge_port)
|
||||
}
|
||||
|
||||
static void change_port_settings(struct tty_struct *tty,
|
||||
struct edgeport_port *edge_port, struct ktermios *old_termios)
|
||||
struct edgeport_port *edge_port, const struct ktermios *old_termios)
|
||||
{
|
||||
struct device *dev = &edge_port->port->dev;
|
||||
struct ump_uart_config *config;
|
||||
@ -2351,7 +2352,8 @@ static void change_port_settings(struct tty_struct *tty,
|
||||
}
|
||||
|
||||
static void edge_set_termios(struct tty_struct *tty,
|
||||
struct usb_serial_port *port, struct ktermios *old_termios)
|
||||
struct usb_serial_port *port,
|
||||
const struct ktermios *old_termios)
|
||||
{
|
||||
struct edgeport_port *edge_port = usb_get_serial_port_data(port);
|
||||
|
||||
|
@ -51,7 +51,8 @@ static unsigned int ir_write_room(struct tty_struct *tty);
|
||||
static void ir_write_bulk_callback(struct urb *urb);
|
||||
static void ir_process_read_urb(struct urb *urb);
|
||||
static void ir_set_termios(struct tty_struct *tty,
|
||||
struct usb_serial_port *port, struct ktermios *old_termios);
|
||||
struct usb_serial_port *port,
|
||||
const struct ktermios *old_termios);
|
||||
|
||||
/* Not that this lot means you can only have one per system */
|
||||
static u8 ir_baud;
|
||||
@ -376,7 +377,8 @@ static void ir_process_read_urb(struct urb *urb)
|
||||
}
|
||||
|
||||
static void ir_set_termios(struct tty_struct *tty,
|
||||
struct usb_serial_port *port, struct ktermios *old_termios)
|
||||
struct usb_serial_port *port,
|
||||
const struct ktermios *old_termios)
|
||||
{
|
||||
struct usb_device *udev = port->serial->dev;
|
||||
unsigned char *transfer_buffer;
|
||||
|
@ -879,7 +879,8 @@ static int iuu_uart_baud(struct usb_serial_port *port, u32 baud_base,
|
||||
}
|
||||
|
||||
static void iuu_set_termios(struct tty_struct *tty,
|
||||
struct usb_serial_port *port, struct ktermios *old_termios)
|
||||
struct usb_serial_port *port,
|
||||
const struct ktermios *old_termios)
|
||||
{
|
||||
const u32 supported_mask = CMSPAR|PARENB|PARODD;
|
||||
struct iuu_private *priv = usb_get_serial_port_data(port);
|
||||
|
@ -616,7 +616,8 @@ static void keyspan_break_ctl(struct tty_struct *tty, int break_state)
|
||||
|
||||
|
||||
static void keyspan_set_termios(struct tty_struct *tty,
|
||||
struct usb_serial_port *port, struct ktermios *old_termios)
|
||||
struct usb_serial_port *port,
|
||||
const struct ktermios *old_termios)
|
||||
{
|
||||
int baud_rate, device_port;
|
||||
struct keyspan_port_private *p_priv;
|
||||
|
@ -321,7 +321,8 @@ static void keyspan_pda_break_ctl(struct tty_struct *tty, int break_state)
|
||||
}
|
||||
|
||||
static void keyspan_pda_set_termios(struct tty_struct *tty,
|
||||
struct usb_serial_port *port, struct ktermios *old_termios)
|
||||
struct usb_serial_port *port,
|
||||
const struct ktermios *old_termios)
|
||||
{
|
||||
struct usb_serial *serial = port->serial;
|
||||
speed_t speed;
|
||||
|
@ -56,7 +56,8 @@ static void klsi_105_port_remove(struct usb_serial_port *port);
|
||||
static int klsi_105_open(struct tty_struct *tty, struct usb_serial_port *port);
|
||||
static void klsi_105_close(struct usb_serial_port *port);
|
||||
static void klsi_105_set_termios(struct tty_struct *tty,
|
||||
struct usb_serial_port *port, struct ktermios *old);
|
||||
struct usb_serial_port *port,
|
||||
const struct ktermios *old_termios);
|
||||
static int klsi_105_tiocmget(struct tty_struct *tty);
|
||||
static void klsi_105_process_read_urb(struct urb *urb);
|
||||
static int klsi_105_prepare_write_buffer(struct usb_serial_port *port,
|
||||
@ -366,7 +367,7 @@ static void klsi_105_process_read_urb(struct urb *urb)
|
||||
|
||||
static void klsi_105_set_termios(struct tty_struct *tty,
|
||||
struct usb_serial_port *port,
|
||||
struct ktermios *old_termios)
|
||||
const struct ktermios *old_termios)
|
||||
{
|
||||
struct klsi_105_private *priv = usb_get_serial_port_data(port);
|
||||
struct device *dev = &port->dev;
|
||||
|
@ -62,7 +62,8 @@ static int kobil_tiocmset(struct tty_struct *tty,
|
||||
static void kobil_read_int_callback(struct urb *urb);
|
||||
static void kobil_write_int_callback(struct urb *urb);
|
||||
static void kobil_set_termios(struct tty_struct *tty,
|
||||
struct usb_serial_port *port, struct ktermios *old);
|
||||
struct usb_serial_port *port,
|
||||
const struct ktermios *old);
|
||||
static void kobil_init_termios(struct tty_struct *tty);
|
||||
|
||||
static const struct usb_device_id id_table[] = {
|
||||
@ -474,7 +475,8 @@ static int kobil_tiocmset(struct tty_struct *tty,
|
||||
}
|
||||
|
||||
static void kobil_set_termios(struct tty_struct *tty,
|
||||
struct usb_serial_port *port, struct ktermios *old)
|
||||
struct usb_serial_port *port,
|
||||
const struct ktermios *old)
|
||||
{
|
||||
struct kobil_private *priv;
|
||||
int result;
|
||||
|
@ -45,7 +45,8 @@ static void mct_u232_close(struct usb_serial_port *port);
|
||||
static void mct_u232_dtr_rts(struct usb_serial_port *port, int on);
|
||||
static void mct_u232_read_int_callback(struct urb *urb);
|
||||
static void mct_u232_set_termios(struct tty_struct *tty,
|
||||
struct usb_serial_port *port, struct ktermios *old);
|
||||
struct usb_serial_port *port,
|
||||
const struct ktermios *old_termios);
|
||||
static void mct_u232_break_ctl(struct tty_struct *tty, int break_state);
|
||||
static int mct_u232_tiocmget(struct tty_struct *tty);
|
||||
static int mct_u232_tiocmset(struct tty_struct *tty,
|
||||
@ -593,7 +594,7 @@ static void mct_u232_read_int_callback(struct urb *urb)
|
||||
|
||||
static void mct_u232_set_termios(struct tty_struct *tty,
|
||||
struct usb_serial_port *port,
|
||||
struct ktermios *old_termios)
|
||||
const struct ktermios *old_termios)
|
||||
{
|
||||
struct usb_serial *serial = port->serial;
|
||||
struct mct_u232_private *priv = usb_get_serial_port_data(port);
|
||||
|
@ -1356,7 +1356,7 @@ static int send_cmd_write_baud_rate(struct moschip_port *mos7720_port,
|
||||
*/
|
||||
static void change_port_settings(struct tty_struct *tty,
|
||||
struct moschip_port *mos7720_port,
|
||||
struct ktermios *old_termios)
|
||||
const struct ktermios *old_termios)
|
||||
{
|
||||
struct usb_serial_port *port;
|
||||
struct usb_serial *serial;
|
||||
@ -1494,7 +1494,8 @@ static void change_port_settings(struct tty_struct *tty,
|
||||
* termios structure.
|
||||
*/
|
||||
static void mos7720_set_termios(struct tty_struct *tty,
|
||||
struct usb_serial_port *port, struct ktermios *old_termios)
|
||||
struct usb_serial_port *port,
|
||||
const struct ktermios *old_termios)
|
||||
{
|
||||
int status;
|
||||
struct moschip_port *mos7720_port;
|
||||
|
@ -1188,7 +1188,8 @@ static int mos7840_send_cmd_write_baud_rate(struct moschip_port *mos7840_port,
|
||||
*****************************************************************************/
|
||||
|
||||
static void mos7840_change_port_settings(struct tty_struct *tty,
|
||||
struct moschip_port *mos7840_port, struct ktermios *old_termios)
|
||||
struct moschip_port *mos7840_port,
|
||||
const struct ktermios *old_termios)
|
||||
{
|
||||
struct usb_serial_port *port = mos7840_port->port;
|
||||
int baud;
|
||||
@ -1330,7 +1331,7 @@ static void mos7840_change_port_settings(struct tty_struct *tty,
|
||||
|
||||
static void mos7840_set_termios(struct tty_struct *tty,
|
||||
struct usb_serial_port *port,
|
||||
struct ktermios *old_termios)
|
||||
const struct ktermios *old_termios)
|
||||
{
|
||||
struct moschip_port *mos7840_port = usb_get_serial_port_data(port);
|
||||
int status;
|
||||
|
@ -760,7 +760,7 @@ static int mxuport_tiocmget(struct tty_struct *tty)
|
||||
}
|
||||
|
||||
static int mxuport_set_termios_flow(struct tty_struct *tty,
|
||||
struct ktermios *old_termios,
|
||||
const struct ktermios *old_termios,
|
||||
struct usb_serial_port *port,
|
||||
struct usb_serial *serial)
|
||||
{
|
||||
@ -834,7 +834,7 @@ static int mxuport_set_termios_flow(struct tty_struct *tty,
|
||||
|
||||
static void mxuport_set_termios(struct tty_struct *tty,
|
||||
struct usb_serial_port *port,
|
||||
struct ktermios *old_termios)
|
||||
const struct ktermios *old_termios)
|
||||
{
|
||||
struct usb_serial *serial = port->serial;
|
||||
u8 *buf;
|
||||
|
@ -119,7 +119,8 @@ struct oti6858_control_pkt {
|
||||
static int oti6858_open(struct tty_struct *tty, struct usb_serial_port *port);
|
||||
static void oti6858_close(struct usb_serial_port *port);
|
||||
static void oti6858_set_termios(struct tty_struct *tty,
|
||||
struct usb_serial_port *port, struct ktermios *old);
|
||||
struct usb_serial_port *port,
|
||||
const struct ktermios *old_termios);
|
||||
static void oti6858_init_termios(struct tty_struct *tty);
|
||||
static void oti6858_read_int_callback(struct urb *urb);
|
||||
static void oti6858_read_bulk_callback(struct urb *urb);
|
||||
@ -395,7 +396,8 @@ static void oti6858_init_termios(struct tty_struct *tty)
|
||||
}
|
||||
|
||||
static void oti6858_set_termios(struct tty_struct *tty,
|
||||
struct usb_serial_port *port, struct ktermios *old_termios)
|
||||
struct usb_serial_port *port,
|
||||
const struct ktermios *old_termios)
|
||||
{
|
||||
struct oti6858_private *priv = usb_get_serial_port_data(port);
|
||||
unsigned long flags;
|
||||
|
@ -789,7 +789,8 @@ static bool pl2303_enable_xonxoff(struct tty_struct *tty, const struct pl2303_ty
|
||||
}
|
||||
|
||||
static void pl2303_set_termios(struct tty_struct *tty,
|
||||
struct usb_serial_port *port, struct ktermios *old_termios)
|
||||
struct usb_serial_port *port,
|
||||
const struct ktermios *old_termios)
|
||||
{
|
||||
struct usb_serial *serial = port->serial;
|
||||
struct pl2303_serial_private *spriv = usb_get_serial_data(serial);
|
||||
|
@ -261,8 +261,8 @@ static int qt2_calc_num_ports(struct usb_serial *serial,
|
||||
}
|
||||
|
||||
static void qt2_set_termios(struct tty_struct *tty,
|
||||
struct usb_serial_port *port,
|
||||
struct ktermios *old_termios)
|
||||
struct usb_serial_port *port,
|
||||
const struct ktermios *old_termios)
|
||||
{
|
||||
struct usb_device *dev = port->serial->dev;
|
||||
struct qt2_port_private *port_priv;
|
||||
|
@ -283,7 +283,8 @@ static void spcp8x5_init_termios(struct tty_struct *tty)
|
||||
}
|
||||
|
||||
static void spcp8x5_set_termios(struct tty_struct *tty,
|
||||
struct usb_serial_port *port, struct ktermios *old_termios)
|
||||
struct usb_serial_port *port,
|
||||
const struct ktermios *old_termios)
|
||||
{
|
||||
struct usb_serial *serial = port->serial;
|
||||
struct spcp8x5_private *priv = usb_get_serial_port_data(port);
|
||||
|
@ -214,8 +214,8 @@ out: kfree(data);
|
||||
|
||||
|
||||
static void ssu100_set_termios(struct tty_struct *tty,
|
||||
struct usb_serial_port *port,
|
||||
struct ktermios *old_termios)
|
||||
struct usb_serial_port *port,
|
||||
const struct ktermios *old_termios)
|
||||
{
|
||||
struct usb_device *dev = port->serial->dev;
|
||||
struct ktermios *termios = &tty->termios;
|
||||
|
@ -314,7 +314,8 @@ static bool ti_tx_empty(struct usb_serial_port *port);
|
||||
static void ti_throttle(struct tty_struct *tty);
|
||||
static void ti_unthrottle(struct tty_struct *tty);
|
||||
static void ti_set_termios(struct tty_struct *tty,
|
||||
struct usb_serial_port *port, struct ktermios *old_termios);
|
||||
struct usb_serial_port *port,
|
||||
const struct ktermios *old_termios);
|
||||
static int ti_tiocmget(struct tty_struct *tty);
|
||||
static int ti_tiocmset(struct tty_struct *tty,
|
||||
unsigned int set, unsigned int clear);
|
||||
@ -892,7 +893,8 @@ static void ti_unthrottle(struct tty_struct *tty)
|
||||
}
|
||||
|
||||
static void ti_set_termios(struct tty_struct *tty,
|
||||
struct usb_serial_port *port, struct ktermios *old_termios)
|
||||
struct usb_serial_port *port,
|
||||
const struct ktermios *old_termios)
|
||||
{
|
||||
struct ti_port *tport = usb_get_serial_port_data(port);
|
||||
struct ti_uart_config *config;
|
||||
|
@ -296,8 +296,8 @@ static speed_t upd78f0730_get_baud_rate(struct tty_struct *tty)
|
||||
}
|
||||
|
||||
static void upd78f0730_set_termios(struct tty_struct *tty,
|
||||
struct usb_serial_port *port,
|
||||
struct ktermios *old_termios)
|
||||
struct usb_serial_port *port,
|
||||
const struct ktermios *old_termios)
|
||||
{
|
||||
struct device *dev = &port->dev;
|
||||
struct upd78f0730_line_control request;
|
||||
|
@ -82,7 +82,8 @@ static void whiteheat_close(struct usb_serial_port *port);
|
||||
static void whiteheat_get_serial(struct tty_struct *tty,
|
||||
struct serial_struct *ss);
|
||||
static void whiteheat_set_termios(struct tty_struct *tty,
|
||||
struct usb_serial_port *port, struct ktermios *old);
|
||||
struct usb_serial_port *port,
|
||||
const struct ktermios *old_termios);
|
||||
static int whiteheat_tiocmget(struct tty_struct *tty);
|
||||
static int whiteheat_tiocmset(struct tty_struct *tty,
|
||||
unsigned int set, unsigned int clear);
|
||||
@ -442,7 +443,8 @@ static void whiteheat_get_serial(struct tty_struct *tty, struct serial_struct *s
|
||||
|
||||
|
||||
static void whiteheat_set_termios(struct tty_struct *tty,
|
||||
struct usb_serial_port *port, struct ktermios *old_termios)
|
||||
struct usb_serial_port *port,
|
||||
const struct ktermios *old_termios)
|
||||
{
|
||||
firm_setup_port(tty);
|
||||
}
|
||||
|
@ -104,7 +104,8 @@ static int xr21v141x_uart_enable(struct usb_serial_port *port);
|
||||
static int xr21v141x_uart_disable(struct usb_serial_port *port);
|
||||
static int xr21v141x_fifo_reset(struct usb_serial_port *port);
|
||||
static void xr21v141x_set_line_settings(struct tty_struct *tty,
|
||||
struct usb_serial_port *port, struct ktermios *old_termios);
|
||||
struct usb_serial_port *port,
|
||||
const struct ktermios *old_termios);
|
||||
|
||||
struct xr_type {
|
||||
int reg_width;
|
||||
@ -133,8 +134,8 @@ struct xr_type {
|
||||
int (*disable)(struct usb_serial_port *port);
|
||||
int (*fifo_reset)(struct usb_serial_port *port);
|
||||
void (*set_line_settings)(struct tty_struct *tty,
|
||||
struct usb_serial_port *port,
|
||||
struct ktermios *old_termios);
|
||||
struct usb_serial_port *port,
|
||||
const struct ktermios *old_termios);
|
||||
};
|
||||
|
||||
enum xr_type_id {
|
||||
@ -622,8 +623,8 @@ static int xr21v141x_set_baudrate(struct tty_struct *tty, struct usb_serial_port
|
||||
}
|
||||
|
||||
static void xr_set_flow_mode(struct tty_struct *tty,
|
||||
struct usb_serial_port *port,
|
||||
struct ktermios *old_termios)
|
||||
struct usb_serial_port *port,
|
||||
const struct ktermios *old_termios)
|
||||
{
|
||||
struct xr_data *data = usb_get_serial_port_data(port);
|
||||
const struct xr_type *type = data->type;
|
||||
@ -674,7 +675,8 @@ static void xr_set_flow_mode(struct tty_struct *tty,
|
||||
}
|
||||
|
||||
static void xr21v141x_set_line_settings(struct tty_struct *tty,
|
||||
struct usb_serial_port *port, struct ktermios *old_termios)
|
||||
struct usb_serial_port *port,
|
||||
const struct ktermios *old_termios)
|
||||
{
|
||||
struct ktermios *termios = &tty->termios;
|
||||
u8 bits = 0;
|
||||
@ -732,7 +734,8 @@ static void xr21v141x_set_line_settings(struct tty_struct *tty,
|
||||
}
|
||||
|
||||
static void xr_cdc_set_line_coding(struct tty_struct *tty,
|
||||
struct usb_serial_port *port, struct ktermios *old_termios)
|
||||
struct usb_serial_port *port,
|
||||
const struct ktermios *old_termios)
|
||||
{
|
||||
struct xr_data *data = usb_get_serial_port_data(port);
|
||||
struct usb_host_interface *alt = port->serial->interface->cur_altsetting;
|
||||
@ -809,7 +812,8 @@ static void xr_cdc_set_line_coding(struct tty_struct *tty,
|
||||
}
|
||||
|
||||
static void xr_set_termios(struct tty_struct *tty,
|
||||
struct usb_serial_port *port, struct ktermios *old_termios)
|
||||
struct usb_serial_port *port,
|
||||
const struct ktermios *old_termios)
|
||||
{
|
||||
struct xr_data *data = usb_get_serial_port_data(port);
|
||||
|
||||
|
@ -276,8 +276,8 @@ struct usb_serial_driver {
|
||||
unsigned int cmd, unsigned long arg);
|
||||
void (*get_serial)(struct tty_struct *tty, struct serial_struct *ss);
|
||||
int (*set_serial)(struct tty_struct *tty, struct serial_struct *ss);
|
||||
void (*set_termios)(struct tty_struct *tty,
|
||||
struct usb_serial_port *port, struct ktermios *old);
|
||||
void (*set_termios)(struct tty_struct *tty, struct usb_serial_port *port,
|
||||
const struct ktermios *old);
|
||||
void (*break_ctl)(struct tty_struct *tty, int break_state);
|
||||
unsigned int (*chars_in_buffer)(struct tty_struct *tty);
|
||||
void (*wait_until_sent)(struct tty_struct *tty, long timeout);
|
||||
|
Loading…
Reference in New Issue
Block a user