moxa.c (69851e4ab8feeb369119a44ddca430c0ee15f0d8) moxa.c (95713967ba52389f7cea75704d0cf048080ec218)
1// SPDX-License-Identifier: GPL-2.0+
2/*****************************************************************************/
3/*
4 * moxa.c -- MOXA Intellio family multiport serial driver.
5 *
6 * Copyright (C) 1999-2000 Moxa Technologies (support@moxa.com).
7 * Copyright (c) 2007 Jiri Slaby <jirislaby@gmail.com>
8 *

--- 473 unchanged lines hidden (view full) ---

482
483module_param(ttymajor, int, 0);
484
485/*
486 * static functions:
487 */
488static int moxa_open(struct tty_struct *, struct file *);
489static void moxa_close(struct tty_struct *, struct file *);
1// SPDX-License-Identifier: GPL-2.0+
2/*****************************************************************************/
3/*
4 * moxa.c -- MOXA Intellio family multiport serial driver.
5 *
6 * Copyright (C) 1999-2000 Moxa Technologies (support@moxa.com).
7 * Copyright (c) 2007 Jiri Slaby <jirislaby@gmail.com>
8 *

--- 473 unchanged lines hidden (view full) ---

482
483module_param(ttymajor, int, 0);
484
485/*
486 * static functions:
487 */
488static int moxa_open(struct tty_struct *, struct file *);
489static void moxa_close(struct tty_struct *, struct file *);
490static int moxa_write(struct tty_struct *, const u8 *, int);
490static ssize_t moxa_write(struct tty_struct *, const u8 *, size_t);
491static unsigned int moxa_write_room(struct tty_struct *);
492static void moxa_flush_buffer(struct tty_struct *);
493static unsigned int moxa_chars_in_buffer(struct tty_struct *);
494static void moxa_set_termios(struct tty_struct *, const struct ktermios *);
495static void moxa_stop(struct tty_struct *);
496static void moxa_start(struct tty_struct *);
497static void moxa_hangup(struct tty_struct *);
498static int moxa_tiocmget(struct tty_struct *tty);

--- 995 unchanged lines hidden (view full) ---

1494
1495static void moxa_close(struct tty_struct *tty, struct file *filp)
1496{
1497 struct moxa_port *ch = tty->driver_data;
1498 ch->cflag = tty->termios.c_cflag;
1499 tty_port_close(&ch->port, tty, filp);
1500}
1501
491static unsigned int moxa_write_room(struct tty_struct *);
492static void moxa_flush_buffer(struct tty_struct *);
493static unsigned int moxa_chars_in_buffer(struct tty_struct *);
494static void moxa_set_termios(struct tty_struct *, const struct ktermios *);
495static void moxa_stop(struct tty_struct *);
496static void moxa_start(struct tty_struct *);
497static void moxa_hangup(struct tty_struct *);
498static int moxa_tiocmget(struct tty_struct *tty);

--- 995 unchanged lines hidden (view full) ---

1494
1495static void moxa_close(struct tty_struct *tty, struct file *filp)
1496{
1497 struct moxa_port *ch = tty->driver_data;
1498 ch->cflag = tty->termios.c_cflag;
1499 tty_port_close(&ch->port, tty, filp);
1500}
1501
1502static int moxa_write(struct tty_struct *tty, const u8 *buf, int count)
1502static ssize_t moxa_write(struct tty_struct *tty, const u8 *buf, size_t count)
1503{
1504 struct moxa_port *ch = tty->driver_data;
1505 unsigned long flags;
1506 int len;
1507
1508 if (ch == NULL)
1509 return 0;
1510

--- 888 unchanged lines hidden ---
1503{
1504 struct moxa_port *ch = tty->driver_data;
1505 unsigned long flags;
1506 int len;
1507
1508 if (ch == NULL)
1509 return 0;
1510

--- 888 unchanged lines hidden ---