tty: propagate u8 data to tty_operations::write()

Data are now typed as u8. Propagate this change to
tty_operations::write().

Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
Cc: Richard Henderson <richard.henderson@linaro.org>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Richard Weinberger <richard@nod.at>
Cc: Anton Ivanov <anton.ivanov@cambridgegreys.com>
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: Chris Zankel <chris@zankel.net>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Vaibhav Gupta <vaibhavgupta40@gmail.com>
Cc: Jens Taprogge <jens.taprogge@taprogge.org>
Cc: Karsten Keil <isdn@linux-pingi.de>
Cc: Scott Branden <scott.branden@broadcom.com>
Cc: Ulf Hansson <ulf.hansson@linaro.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Paolo Abeni <pabeni@redhat.com>
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Cc: Alexander Gordeev <agordeev@linux.ibm.com>
Cc: Christian Borntraeger <borntraeger@linux.ibm.com>
Cc: Sven Schnelle <svens@linux.ibm.com>
Cc: David Lin <dtwlin@gmail.com>
Cc: Johan Hovold <johan@kernel.org>
Cc: Alex Elder <elder@kernel.org>
Cc: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Cc: Jiri Kosina <jikos@kernel.org>
Cc: David Sterba <dsterba@suse.com>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: NXP Linux Team <linux-imx@nxp.com>
Cc: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
Cc: Oliver Neukum <oneukum@suse.com>
Cc: Mathias Nyman <mathias.nyman@intel.com>
Cc: Marcel Holtmann <marcel@holtmann.org>
Cc: Johan Hedberg <johan.hedberg@gmail.com>
Cc: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Link: https://lore.kernel.org/r/20230810091510.13006-28-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Jiri Slaby (SUSE) 2023-08-10 11:15:01 +02:00 committed by Greg Kroah-Hartman
parent 48a6ab8867
commit 69851e4ab8
43 changed files with 53 additions and 88 deletions

View file

@ -130,8 +130,7 @@ srmcons_do_write(struct tty_port *port, const char *buf, int count)
} }
static int static int
srmcons_write(struct tty_struct *tty, srmcons_write(struct tty_struct *tty, const u8 *buf, int count)
const unsigned char *buf, int count)
{ {
unsigned long flags; unsigned long flags;

View file

@ -70,8 +70,7 @@ static void nfcon_tty_close(struct tty_struct *tty, struct file *filp)
{ {
} }
static int nfcon_tty_write(struct tty_struct *tty, const unsigned char *buf, static int nfcon_tty_write(struct tty_struct *tty, const u8 *buf, int count)
int count)
{ {
nfputs(buf, count); nfputs(buf, count);
return count; return count;

View file

@ -184,7 +184,7 @@ void line_flush_chars(struct tty_struct *tty)
line_flush_buffer(tty); line_flush_buffer(tty);
} }
int line_write(struct tty_struct *tty, const unsigned char *buf, int len) int line_write(struct tty_struct *tty, const u8 *buf, int len)
{ {
struct line *line = tty->driver_data; struct line *line = tty->driver_data;
unsigned long flags; unsigned long flags;

View file

@ -64,8 +64,7 @@ extern void line_cleanup(struct tty_struct *tty);
extern void line_hangup(struct tty_struct *tty); extern void line_hangup(struct tty_struct *tty);
extern int line_setup(char **conf, unsigned nlines, char **def, extern int line_setup(char **conf, unsigned nlines, char **def,
char *init, char *name); char *init, char *name);
extern int line_write(struct tty_struct *tty, const unsigned char *buf, extern int line_write(struct tty_struct *tty, const u8 *buf, int len);
int len);
extern unsigned int line_chars_in_buffer(struct tty_struct *tty); extern unsigned int line_chars_in_buffer(struct tty_struct *tty);
extern void line_flush_buffer(struct tty_struct *tty); extern void line_flush_buffer(struct tty_struct *tty);
extern void line_flush_chars(struct tty_struct *tty); extern void line_flush_chars(struct tty_struct *tty);

View file

@ -52,8 +52,7 @@ static void rs_close(struct tty_struct *tty, struct file * filp)
} }
static int rs_write(struct tty_struct * tty, static int rs_write(struct tty_struct * tty, const u8 *buf, int count)
const unsigned char *buf, int count)
{ {
/* see drivers/char/serialX.c to reference original version */ /* see drivers/char/serialX.c to reference original version */

View file

@ -51,7 +51,7 @@ static void tpk_flush(void)
} }
} }
static int tpk_printk(const unsigned char *buf, int count) static int tpk_printk(const u8 *buf, int count)
{ {
int i; int i;
@ -103,8 +103,7 @@ static void tpk_close(struct tty_struct *tty, struct file *filp)
/* /*
* TTY operations write function. * TTY operations write function.
*/ */
static int tpk_write(struct tty_struct *tty, static int tpk_write(struct tty_struct *tty, const u8 *buf, int count)
const unsigned char *buf, int count)
{ {
struct ttyprintk_port *tpkp = tty->driver_data; struct ttyprintk_port *tpkp = tty->driver_data;
unsigned long flags; unsigned long flags;

View file

@ -437,8 +437,7 @@ err_put_driver:
} }
static inline int ipoctal_copy_write_buffer(struct ipoctal_channel *channel, static inline int ipoctal_copy_write_buffer(struct ipoctal_channel *channel,
const unsigned char *buf, const u8 *buf, int count)
int count)
{ {
unsigned long flags; unsigned long flags;
int i; int i;
@ -459,8 +458,7 @@ static inline int ipoctal_copy_write_buffer(struct ipoctal_channel *channel,
return i; return i;
} }
static int ipoctal_write_tty(struct tty_struct *tty, static int ipoctal_write_tty(struct tty_struct *tty, const u8 *buf, int count)
const unsigned char *buf, int count)
{ {
struct ipoctal_channel *channel = tty->driver_data; struct ipoctal_channel *channel = tty->driver_data;
unsigned int char_copied; unsigned int char_copied;

View file

@ -1077,8 +1077,7 @@ static void capinc_tty_close(struct tty_struct *tty, struct file *filp)
tty_port_close(&mp->port, tty, filp); tty_port_close(&mp->port, tty, filp);
} }
static int capinc_tty_write(struct tty_struct *tty, static int capinc_tty_write(struct tty_struct *tty, const u8 *buf, int count)
const unsigned char *buf, int count)
{ {
struct capiminor *mp = tty->driver_data; struct capiminor *mp = tty->driver_data;
struct sk_buff *skb; struct sk_buff *skb;

View file

@ -186,9 +186,7 @@ static void bcm_vk_tty_doorbell(struct bcm_vk *vk, u32 db_val)
VK_BAR0_REGSEG_DB_BASE + VK_BAR0_REGSEG_TTY_DB_OFFSET); VK_BAR0_REGSEG_DB_BASE + VK_BAR0_REGSEG_TTY_DB_OFFSET);
} }
static int bcm_vk_tty_write(struct tty_struct *tty, static int bcm_vk_tty_write(struct tty_struct *tty, const u8 *buffer, int count)
const unsigned char *buffer,
int count)
{ {
int index; int index;
struct bcm_vk *vk; struct bcm_vk *vk;

View file

@ -760,8 +760,7 @@ static void sdio_uart_hangup(struct tty_struct *tty)
tty_port_hangup(&port->port); tty_port_hangup(&port->port);
} }
static int sdio_uart_write(struct tty_struct *tty, const unsigned char *buf, static int sdio_uart_write(struct tty_struct *tty, const u8 *buf, int count)
int count)
{ {
struct sdio_uart_port *port = tty->driver_data; struct sdio_uart_port *port = tty->driver_data;
int ret; int ret;

View file

@ -1322,8 +1322,7 @@ static void hso_serial_close(struct tty_struct *tty, struct file *filp)
} }
/* close the requested serial port */ /* close the requested serial port */
static int hso_serial_write(struct tty_struct *tty, const unsigned char *buf, static int hso_serial_write(struct tty_struct *tty, const u8 *buf, int count)
int count)
{ {
struct hso_serial *serial = tty->driver_data; struct hso_serial *serial = tty->driver_data;
int space, tx_bytes; int space, tx_bytes;

View file

@ -1021,8 +1021,7 @@ static unsigned int tty3215_write_room(struct tty_struct *tty)
/* /*
* String write routine for 3215 ttys * String write routine for 3215 ttys
*/ */
static int tty3215_write(struct tty_struct *tty, static int tty3215_write(struct tty_struct *tty, const u8 *buf, int count)
const unsigned char *buf, int count)
{ {
handle_write(tty->driver_data, buf, count); handle_write(tty->driver_data, buf, count);
return count; return count;

View file

@ -1803,8 +1803,7 @@ static void tty3270_do_write(struct tty3270 *tp, struct tty_struct *tty,
/* /*
* String write routine for 3270 ttys * String write routine for 3270 ttys
*/ */
static int tty3270_write(struct tty_struct *tty, static int tty3270_write(struct tty_struct *tty, const u8 *buf, int count)
const unsigned char *buf, int count)
{ {
struct tty3270 *tp; struct tty3270 *tp;

View file

@ -230,7 +230,7 @@ out:
* routine will return the number of characters actually accepted for writing. * routine will return the number of characters actually accepted for writing.
*/ */
static int static int
sclp_tty_write(struct tty_struct *tty, const unsigned char *buf, int count) sclp_tty_write(struct tty_struct *tty, const u8 *buf, int count)
{ {
if (sclp_tty_chars_count > 0) { if (sclp_tty_chars_count > 0) {
sclp_tty_write_string(sclp_tty_chars, sclp_tty_chars_count, 0); sclp_tty_write_string(sclp_tty_chars, sclp_tty_chars_count, 0);

View file

@ -463,7 +463,7 @@ out:
* number of characters actually accepted for writing. * number of characters actually accepted for writing.
*/ */
static int static int
sclp_vt220_write(struct tty_struct *tty, const unsigned char *buf, int count) sclp_vt220_write(struct tty_struct *tty, const u8 *buf, int count)
{ {
return __sclp_vt220_write(buf, count, 1, 0, 1); return __sclp_vt220_write(buf, count, 1, 0, 1);
} }

View file

@ -149,8 +149,7 @@ static void gdm_tty_send_complete(void *arg)
tty_port_tty_wakeup(&gdm->port); tty_port_tty_wakeup(&gdm->port);
} }
static int gdm_tty_write(struct tty_struct *tty, const unsigned char *buf, static int gdm_tty_write(struct tty_struct *tty, const u8 *buf, int len)
int len)
{ {
struct gdm *gdm = tty->driver_data; struct gdm *gdm = tty->driver_data;
int remain = len; int remain = len;

View file

@ -427,8 +427,7 @@ static void gb_tty_hangup(struct tty_struct *tty)
tty_port_hangup(&gb_tty->port); tty_port_hangup(&gb_tty->port);
} }
static int gb_tty_write(struct tty_struct *tty, const unsigned char *buf, static int gb_tty_write(struct tty_struct *tty, const u8 *buf, int count)
int count)
{ {
struct gb_tty *gb_tty = tty->driver_data; struct gb_tty *gb_tty = tty->driver_data;

View file

@ -741,7 +741,7 @@ static void rs_flush_chars(struct tty_struct *tty)
local_irq_restore(flags); local_irq_restore(flags);
} }
static int rs_write(struct tty_struct * tty, const unsigned char *buf, int count) static int rs_write(struct tty_struct * tty, const u8 *buf, int count)
{ {
int c, ret = 0; int c, ret = 0;
struct serial_state *info = tty->driver_data; struct serial_state *info = tty->driver_data;

View file

@ -466,8 +466,7 @@ static irqreturn_t ehv_bc_tty_tx_isr(int irq, void *data)
* ehv_bc_tty_write_room() will never lie, so the tty layer will never send us * ehv_bc_tty_write_room() will never lie, so the tty layer will never send us
* too much data. * too much data.
*/ */
static int ehv_bc_tty_write(struct tty_struct *ttys, const unsigned char *s, static int ehv_bc_tty_write(struct tty_struct *ttys, const u8 *s, int count)
int count)
{ {
struct ehv_bc_data *bc = ttys->driver_data; struct ehv_bc_data *bc = ttys->driver_data;
unsigned long flags; unsigned long flags;

View file

@ -125,8 +125,7 @@ static void goldfish_tty_rw(struct goldfish_tty *qtty,
} }
} }
static void goldfish_tty_do_write(int line, const char *buf, static void goldfish_tty_do_write(int line, const u8 *buf, unsigned int count)
unsigned int count)
{ {
struct goldfish_tty *qtty = &goldfish_ttys[line]; struct goldfish_tty *qtty = &goldfish_ttys[line];
unsigned long address = (unsigned long)(void *)buf; unsigned long address = (unsigned long)(void *)buf;
@ -186,8 +185,7 @@ static void goldfish_tty_hangup(struct tty_struct *tty)
tty_port_hangup(tty->port); tty_port_hangup(tty->port);
} }
static int goldfish_tty_write(struct tty_struct *tty, const unsigned char *buf, static int goldfish_tty_write(struct tty_struct *tty, const u8 *buf, int count)
int count)
{ {
goldfish_tty_do_write(tty->index, buf, count); goldfish_tty_do_write(tty->index, buf, count);
return count; return count;

View file

@ -496,7 +496,7 @@ static int hvc_push(struct hvc_struct *hp)
return n; return n;
} }
static int hvc_write(struct tty_struct *tty, const unsigned char *buf, int count) static int hvc_write(struct tty_struct *tty, const u8 *buf, int count)
{ {
struct hvc_struct *hp = tty->driver_data; struct hvc_struct *hp = tty->driver_data;
unsigned long flags; unsigned long flags;

View file

@ -1257,8 +1257,7 @@ static void hvcs_hangup(struct tty_struct * tty)
* tty_hangup will allow hvcs_write time to complete execution before it * tty_hangup will allow hvcs_write time to complete execution before it
* terminates our device. * terminates our device.
*/ */
static int hvcs_write(struct tty_struct *tty, static int hvcs_write(struct tty_struct *tty, const u8 *buf, int count)
const unsigned char *buf, int count)
{ {
struct hvcs_struct *hvcsd = tty->driver_data; struct hvcs_struct *hvcsd = tty->driver_data;
unsigned int unit_address; unsigned int unit_address;

View file

@ -904,8 +904,7 @@ static unsigned int hvsi_chars_in_buffer(struct tty_struct *tty)
return hp->n_outbuf; return hp->n_outbuf;
} }
static int hvsi_write(struct tty_struct *tty, static int hvsi_write(struct tty_struct *tty, const u8 *source, int count)
const unsigned char *source, int count)
{ {
struct hvsi_struct *hp = tty->driver_data; struct hvsi_struct *hp = tty->driver_data;
unsigned long flags; unsigned long flags;

View file

@ -1292,7 +1292,7 @@ static void *alloc_ctrl_packet(int header_size,
} }
int ipwireless_send_packet(struct ipw_hardware *hw, unsigned int channel_idx, int ipwireless_send_packet(struct ipw_hardware *hw, unsigned int channel_idx,
const unsigned char *data, unsigned int length, const u8 *data, unsigned int length,
void (*callback) (void *cb, unsigned int length), void (*callback) (void *cb, unsigned int length),
void *callback_data) void *callback_data)
{ {

View file

@ -186,8 +186,7 @@ static void ipw_write_packet_sent_callback(void *callback_data,
tty->tx_bytes_queued -= packet_length; tty->tx_bytes_queued -= packet_length;
} }
static int ipw_write(struct tty_struct *linux_tty, static int ipw_write(struct tty_struct *linux_tty, const u8 *buf, int count)
const unsigned char *buf, int count)
{ {
struct ipw_tty *tty = linux_tty->driver_data; struct ipw_tty *tty = linux_tty->driver_data;
int room, ret; int room, ret;

View file

@ -796,8 +796,8 @@ static void mips_ejtag_fdc_tty_hangup(struct tty_struct *tty)
tty_port_hangup(tty->port); tty_port_hangup(tty->port);
} }
static int mips_ejtag_fdc_tty_write(struct tty_struct *tty, static int mips_ejtag_fdc_tty_write(struct tty_struct *tty, const u8 *buf,
const unsigned char *buf, int total) int total)
{ {
int count, block; int count, block;
struct mips_ejtag_fdc_tty_port *dport = tty->driver_data; struct mips_ejtag_fdc_tty_port *dport = tty->driver_data;

View file

@ -487,7 +487,7 @@ module_param(ttymajor, int, 0);
*/ */
static int moxa_open(struct tty_struct *, struct file *); static int moxa_open(struct tty_struct *, struct file *);
static void moxa_close(struct tty_struct *, struct file *); static void moxa_close(struct tty_struct *, struct file *);
static int moxa_write(struct tty_struct *, const unsigned char *, int); static int moxa_write(struct tty_struct *, const u8 *, int);
static unsigned int moxa_write_room(struct tty_struct *); static unsigned int moxa_write_room(struct tty_struct *);
static void moxa_flush_buffer(struct tty_struct *); static void moxa_flush_buffer(struct tty_struct *);
static unsigned int moxa_chars_in_buffer(struct tty_struct *); static unsigned int moxa_chars_in_buffer(struct tty_struct *);
@ -1499,8 +1499,7 @@ static void moxa_close(struct tty_struct *tty, struct file *filp)
tty_port_close(&ch->port, tty, filp); tty_port_close(&ch->port, tty, filp);
} }
static int moxa_write(struct tty_struct *tty, static int moxa_write(struct tty_struct *tty, const u8 *buf, int count)
const unsigned char *buf, int count)
{ {
struct moxa_port *ch = tty->driver_data; struct moxa_port *ch = tty->driver_data;
unsigned long flags; unsigned long flags;
@ -2164,8 +2163,7 @@ static int MoxaPortLineStatus(struct moxa_port *port)
return val; return val;
} }
static int MoxaPortWriteData(struct tty_struct *tty, static int MoxaPortWriteData(struct tty_struct *tty, const u8 *buffer, int len)
const unsigned char *buffer, int len)
{ {
struct moxa_port *port = tty->driver_data; struct moxa_port *port = tty->driver_data;
void __iomem *baseAddr, *ofsAddr, *ofs; void __iomem *baseAddr, *ofsAddr, *ofs;

View file

@ -901,7 +901,7 @@ static void mxser_close(struct tty_struct *tty, struct file *filp)
tty_port_close(tty->port, tty, filp); tty_port_close(tty->port, tty, filp);
} }
static int mxser_write(struct tty_struct *tty, const unsigned char *buf, int count) static int mxser_write(struct tty_struct *tty, const u8 *buf, int count)
{ {
struct mxser_port *info = tty->driver_data; struct mxser_port *info = tty->driver_data;
unsigned long flags; unsigned long flags;

View file

@ -4256,8 +4256,7 @@ static void gsmtty_hangup(struct tty_struct *tty)
gsm_dlci_begin_close(dlci); gsm_dlci_begin_close(dlci);
} }
static int gsmtty_write(struct tty_struct *tty, const unsigned char *buf, static int gsmtty_write(struct tty_struct *tty, const u8 *buf, int len)
int len)
{ {
int sent; int sent;
struct gsm_dlci *dlci = tty->driver_data; struct gsm_dlci *dlci = tty->driver_data;

View file

@ -1599,8 +1599,7 @@ static void ntty_hangup(struct tty_struct *tty)
* called when the userspace process writes to the tty (/dev/noz*). * called when the userspace process writes to the tty (/dev/noz*).
* Data is inserted into a fifo, which is then read and transferred to the modem. * Data is inserted into a fifo, which is then read and transferred to the modem.
*/ */
static int ntty_write(struct tty_struct *tty, const unsigned char *buffer, static int ntty_write(struct tty_struct *tty, const u8 *buffer, int count)
int count)
{ {
int rval = -EINVAL; int rval = -EINVAL;
struct nozomi *dc = get_dc_by_tty(tty); struct nozomi *dc = get_dc_by_tty(tty);
@ -1610,7 +1609,7 @@ static int ntty_write(struct tty_struct *tty, const unsigned char *buffer,
if (!dc || !port) if (!dc || !port)
return -ENODEV; return -ENODEV;
rval = kfifo_in(&port->fifo_ul, (unsigned char *)buffer, count); rval = kfifo_in(&port->fifo_ul, buffer, count);
spin_lock_irqsave(&dc->spin_mutex, flags); spin_lock_irqsave(&dc->spin_mutex, flags);
/* CTS is only valid on the modem channel */ /* CTS is only valid on the modem channel */

View file

@ -108,7 +108,7 @@ static void pty_unthrottle(struct tty_struct *tty)
* the other side of the pty/tty pair. * the other side of the pty/tty pair.
*/ */
static int pty_write(struct tty_struct *tty, const unsigned char *buf, int c) static int pty_write(struct tty_struct *tty, const u8 *buf, int c)
{ {
struct tty_struct *to = tty->link; struct tty_struct *to = tty->link;

View file

@ -304,7 +304,7 @@ static unsigned int kgdb_nmi_tty_write_room(struct tty_struct *tty)
return 2048; return 2048;
} }
static int kgdb_nmi_tty_write(struct tty_struct *tty, const unchar *buf, int c) static int kgdb_nmi_tty_write(struct tty_struct *tty, const u8 *buf, int c)
{ {
int i; int i;

View file

@ -580,8 +580,7 @@ static void uart_flush_chars(struct tty_struct *tty)
uart_start(tty); uart_start(tty);
} }
static int uart_write(struct tty_struct *tty, static int uart_write(struct tty_struct *tty, const u8 *buf, int count)
const unsigned char *buf, int count)
{ {
struct uart_state *state = tty->driver_data; struct uart_state *state = tty->driver_data;
struct uart_port *port; struct uart_port *port;

View file

@ -431,7 +431,7 @@ static void tx_set_idle(struct slgt_info *info);
static unsigned int tbuf_bytes(struct slgt_info *info); static unsigned int tbuf_bytes(struct slgt_info *info);
static void reset_tbufs(struct slgt_info *info); static void reset_tbufs(struct slgt_info *info);
static void tdma_reset(struct slgt_info *info); static void tdma_reset(struct slgt_info *info);
static bool tx_load(struct slgt_info *info, const char *buf, unsigned int count); static bool tx_load(struct slgt_info *info, const u8 *buf, unsigned int count);
static void get_gtsignals(struct slgt_info *info); static void get_gtsignals(struct slgt_info *info);
static void set_gtsignals(struct slgt_info *info); static void set_gtsignals(struct slgt_info *info);
@ -745,8 +745,7 @@ static void update_tx_timer(struct slgt_info *info)
} }
} }
static int write(struct tty_struct *tty, static int write(struct tty_struct *tty, const u8 *buf, int count)
const unsigned char *buf, int count)
{ {
int ret = 0; int ret = 0;
struct slgt_info *info = tty->driver_data; struct slgt_info *info = tty->driver_data;
@ -4767,7 +4766,7 @@ static unsigned int tbuf_bytes(struct slgt_info *info)
* load data into transmit DMA buffer ring and start transmitter if needed * load data into transmit DMA buffer ring and start transmitter if needed
* return true if data accepted, otherwise false (buffers full) * return true if data accepted, otherwise false (buffers full)
*/ */
static bool tx_load(struct slgt_info *info, const char *buf, unsigned int size) static bool tx_load(struct slgt_info *info, const u8 *buf, unsigned int size)
{ {
unsigned short count; unsigned short count;
unsigned int i; unsigned int i;

View file

@ -29,8 +29,7 @@ static void ttynull_hangup(struct tty_struct *tty)
tty_port_hangup(&ttynull_port); tty_port_hangup(&ttynull_port);
} }
static int ttynull_write(struct tty_struct *tty, const unsigned char *buf, static int ttynull_write(struct tty_struct *tty, const u8 *buf, int count)
int count)
{ {
return count; return count;
} }

View file

@ -804,8 +804,7 @@ static void vcc_hangup(struct tty_struct *tty)
tty_port_hangup(tty->port); tty_port_hangup(tty->port);
} }
static int vcc_write(struct tty_struct *tty, const unsigned char *buf, static int vcc_write(struct tty_struct *tty, const u8 *buf, int count)
int count)
{ {
struct vcc_port *port; struct vcc_port *port;
struct vio_vcc *pkt; struct vio_vcc *pkt;

View file

@ -2845,7 +2845,7 @@ static int vc_con_write_normal(struct vc_data *vc, int tc, int c,
} }
/* acquires console_lock */ /* acquires console_lock */
static int do_con_write(struct tty_struct *tty, const unsigned char *buf, int count) static int do_con_write(struct tty_struct *tty, const u8 *buf, int count)
{ {
struct vc_draw_region draw = { struct vc_draw_region draw = {
.x = -1, .x = -1,
@ -3238,7 +3238,7 @@ int tioclinux(struct tty_struct *tty, unsigned long arg)
* /dev/ttyN handling * /dev/ttyN handling
*/ */
static int con_write(struct tty_struct *tty, const unsigned char *buf, int count) static int con_write(struct tty_struct *tty, const u8 *buf, int count)
{ {
int retval; int retval;

View file

@ -789,8 +789,7 @@ static void acm_tty_close(struct tty_struct *tty, struct file *filp)
tty_port_close(&acm->port, tty, filp); tty_port_close(&acm->port, tty, filp);
} }
static int acm_tty_write(struct tty_struct *tty, static int acm_tty_write(struct tty_struct *tty, const u8 *buf, int count)
const unsigned char *buf, int count)
{ {
struct acm *acm = tty->driver_data; struct acm *acm = tty->driver_data;
int stat; int stat;

View file

@ -734,7 +734,7 @@ exit:
spin_unlock_irq(&port->port_lock); spin_unlock_irq(&port->port_lock);
} }
static int gs_write(struct tty_struct *tty, const unsigned char *buf, int count) static int gs_write(struct tty_struct *tty, const u8 *buf, int count)
{ {
struct gs_port *port = tty->driver_data; struct gs_port *port = tty->driver_data;
unsigned long flags; unsigned long flags;

View file

@ -208,9 +208,7 @@ static void dbc_tty_close(struct tty_struct *tty, struct file *file)
tty_port_close(&port->port, tty, file); tty_port_close(&port->port, tty, file);
} }
static int dbc_tty_write(struct tty_struct *tty, static int dbc_tty_write(struct tty_struct *tty, const u8 *buf, int count)
const unsigned char *buf,
int count)
{ {
struct dbc_port *port = tty->driver_data; struct dbc_port *port = tty->driver_data;
unsigned long flags; unsigned long flags;

View file

@ -361,8 +361,7 @@ static void serial_cleanup(struct tty_struct *tty)
module_put(owner); module_put(owner);
} }
static int serial_write(struct tty_struct *tty, const unsigned char *buf, static int serial_write(struct tty_struct *tty, const u8 *buf, int count)
int count)
{ {
struct usb_serial_port *port = tty->driver_data; struct usb_serial_port *port = tty->driver_data;
int retval = -ENODEV; int retval = -ENODEV;

View file

@ -356,8 +356,7 @@ struct tty_operations {
void (*close)(struct tty_struct * tty, struct file * filp); void (*close)(struct tty_struct * tty, struct file * filp);
void (*shutdown)(struct tty_struct *tty); void (*shutdown)(struct tty_struct *tty);
void (*cleanup)(struct tty_struct *tty); void (*cleanup)(struct tty_struct *tty);
int (*write)(struct tty_struct * tty, int (*write)(struct tty_struct *tty, const u8 *buf, int count);
const unsigned char *buf, int count);
int (*put_char)(struct tty_struct *tty, unsigned char ch); int (*put_char)(struct tty_struct *tty, unsigned char ch);
void (*flush_chars)(struct tty_struct *tty); void (*flush_chars)(struct tty_struct *tty);
unsigned int (*write_room)(struct tty_struct *tty); unsigned int (*write_room)(struct tty_struct *tty);

View file

@ -779,7 +779,7 @@ static void rfcomm_tty_close(struct tty_struct *tty, struct file *filp)
tty_port_close(&dev->port, tty, filp); tty_port_close(&dev->port, tty, filp);
} }
static int rfcomm_tty_write(struct tty_struct *tty, const unsigned char *buf, int count) static int rfcomm_tty_write(struct tty_struct *tty, const u8 *buf, int count)
{ {
struct rfcomm_dev *dev = tty->driver_data; struct rfcomm_dev *dev = tty->driver_data;
struct rfcomm_dlc *dlc = dev->dlc; struct rfcomm_dlc *dlc = dev->dlc;