tty: propagate u8 data to tty_operations::write()
authorJiri Slaby (SUSE) <jirislaby@kernel.org>
Thu, 10 Aug 2023 09:15:01 +0000 (11:15 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Aug 2023 19:12:46 +0000 (21:12 +0200)
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>
43 files changed:
arch/alpha/kernel/srmcons.c
arch/m68k/emu/nfcon.c
arch/um/drivers/line.c
arch/um/drivers/line.h
arch/xtensa/platforms/iss/console.c
drivers/char/ttyprintk.c
drivers/ipack/devices/ipoctal.c
drivers/isdn/capi/capi.c
drivers/misc/bcm-vk/bcm_vk_tty.c
drivers/mmc/core/sdio_uart.c
drivers/net/usb/hso.c
drivers/s390/char/con3215.c
drivers/s390/char/con3270.c
drivers/s390/char/sclp_tty.c
drivers/s390/char/sclp_vt220.c
drivers/staging/gdm724x/gdm_tty.c
drivers/staging/greybus/uart.c
drivers/tty/amiserial.c
drivers/tty/ehv_bytechan.c
drivers/tty/goldfish.c
drivers/tty/hvc/hvc_console.c
drivers/tty/hvc/hvcs.c
drivers/tty/hvc/hvsi.c
drivers/tty/ipwireless/hardware.c
drivers/tty/ipwireless/tty.c
drivers/tty/mips_ejtag_fdc.c
drivers/tty/moxa.c
drivers/tty/mxser.c
drivers/tty/n_gsm.c
drivers/tty/nozomi.c
drivers/tty/pty.c
drivers/tty/serial/kgdb_nmi.c
drivers/tty/serial/serial_core.c
drivers/tty/synclink_gt.c
drivers/tty/ttynull.c
drivers/tty/vcc.c
drivers/tty/vt/vt.c
drivers/usb/class/cdc-acm.c
drivers/usb/gadget/function/u_serial.c
drivers/usb/host/xhci-dbgtty.c
drivers/usb/serial/usb-serial.c
include/linux/tty_driver.h
net/bluetooth/rfcomm/tty.c

index 6dc952b..dea3900 100644 (file)
@@ -130,8 +130,7 @@ srmcons_do_write(struct tty_port *port, const char *buf, int count)
 }
 
 static int
-srmcons_write(struct tty_struct *tty,
-             const unsigned char *buf, int count)
+srmcons_write(struct tty_struct *tty, const u8 *buf, int count)
 {
        unsigned long flags;
 
index 6fdc136..e7a2123 100644 (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,
-                          int count)
+static int nfcon_tty_write(struct tty_struct *tty, const u8 *buf, int count)
 {
        nfputs(buf, count);
        return count;
index 02b0bef..e5393b4 100644 (file)
@@ -184,7 +184,7 @@ void line_flush_chars(struct tty_struct *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;
        unsigned long flags;
index f15be75..8354024 100644 (file)
@@ -64,8 +64,7 @@ extern void line_cleanup(struct tty_struct *tty);
 extern void line_hangup(struct tty_struct *tty);
 extern int line_setup(char **conf, unsigned nlines, char **def,
                      char *init, char *name);
-extern int line_write(struct tty_struct *tty, const unsigned char *buf,
-                     int len);
+extern int line_write(struct tty_struct *tty, const u8 *buf, int len);
 extern unsigned int line_chars_in_buffer(struct tty_struct *tty);
 extern void line_flush_buffer(struct tty_struct *tty);
 extern void line_flush_chars(struct tty_struct *tty);
index b40b738..182ec57 100644 (file)
@@ -52,8 +52,7 @@ static void rs_close(struct tty_struct *tty, struct file * filp)
 }
 
 
-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)
 {
        /* see drivers/char/serialX.c to reference original version */
 
index ed45d04..4f3dd93 100644 (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;
 
@@ -103,8 +103,7 @@ static void tpk_close(struct tty_struct *tty, struct file *filp)
 /*
  * TTY operations write function.
  */
-static int tpk_write(struct tty_struct *tty,
-               const unsigned char *buf, int count)
+static int tpk_write(struct tty_struct *tty, const u8 *buf, int count)
 {
        struct ttyprintk_port *tpkp = tty->driver_data;
        unsigned long flags;
index a01c158..c3cf086 100644 (file)
@@ -437,8 +437,7 @@ err_put_driver:
 }
 
 static inline int ipoctal_copy_write_buffer(struct ipoctal_channel *channel,
-                                           const unsigned char *buf,
-                                           int count)
+                                           const u8 *buf, int count)
 {
        unsigned long flags;
        int i;
@@ -459,8 +458,7 @@ static inline int ipoctal_copy_write_buffer(struct ipoctal_channel *channel,
        return i;
 }
 
-static int ipoctal_write_tty(struct tty_struct *tty,
-                            const unsigned char *buf, int count)
+static int ipoctal_write_tty(struct tty_struct *tty, const u8 *buf, int count)
 {
        struct ipoctal_channel *channel = tty->driver_data;
        unsigned int char_copied;
index 45a4043..cf6daf7 100644 (file)
@@ -1077,8 +1077,7 @@ static void capinc_tty_close(struct tty_struct *tty, struct file *filp)
        tty_port_close(&mp->port, tty, filp);
 }
 
-static int capinc_tty_write(struct tty_struct *tty,
-                           const unsigned char *buf, int count)
+static int capinc_tty_write(struct tty_struct *tty, const u8 *buf, int count)
 {
        struct capiminor *mp = tty->driver_data;
        struct sk_buff *skb;
index 6669625..44851b6 100644 (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);
 }
 
-static int bcm_vk_tty_write(struct tty_struct *tty,
-                           const unsigned char *buffer,
-                           int count)
+static int bcm_vk_tty_write(struct tty_struct *tty, const u8 *buffer, int count)
 {
        int index;
        struct bcm_vk *vk;
index aa65975..90d2fe0 100644 (file)
@@ -760,8 +760,7 @@ static void sdio_uart_hangup(struct tty_struct *tty)
        tty_port_hangup(&port->port);
 }
 
-static int sdio_uart_write(struct tty_struct *tty, const unsigned char *buf,
-                          int count)
+static int sdio_uart_write(struct tty_struct *tty, const u8 *buf, int count)
 {
        struct sdio_uart_port *port = tty->driver_data;
        int ret;
index ce1f608..014a9d2 100644 (file)
@@ -1322,8 +1322,7 @@ static void hso_serial_close(struct tty_struct *tty, struct file *filp)
 }
 
 /* close the requested serial port */
-static int hso_serial_write(struct tty_struct *tty, const unsigned char *buf,
-                           int count)
+static int hso_serial_write(struct tty_struct *tty, const u8 *buf, int count)
 {
        struct hso_serial *serial = tty->driver_data;
        int space, tx_bytes;
index a1fef66..16b6f43 100644 (file)
@@ -1021,8 +1021,7 @@ static unsigned int tty3215_write_room(struct tty_struct *tty)
 /*
  * String write routine for 3215 ttys
  */
-static int tty3215_write(struct tty_struct *tty,
-                        const unsigned char *buf, int count)
+static int tty3215_write(struct tty_struct *tty, const u8 *buf, int count)
 {
        handle_write(tty->driver_data, buf, count);
        return count;
index d998355..123524b 100644 (file)
@@ -1803,8 +1803,7 @@ static void tty3270_do_write(struct tty3270 *tp, struct tty_struct *tty,
 /*
  * String write routine for 3270 ttys
  */
-static int tty3270_write(struct tty_struct *tty,
-                        const unsigned char *buf, int count)
+static int tty3270_write(struct tty_struct *tty, const u8 *buf, int count)
 {
        struct tty3270 *tp;
 
index 971fbb5..cc0f6a9 100644 (file)
@@ -230,7 +230,7 @@ out:
  * routine will return the number of characters actually accepted for writing.
  */
 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) {
                sclp_tty_write_string(sclp_tty_chars, sclp_tty_chars_count, 0);
index a32f34a..44974d8 100644 (file)
@@ -463,7 +463,7 @@ out:
  * number of characters actually accepted for writing.
  */
 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);
 }
index e1a84d6..ae9978b 100644 (file)
@@ -149,8 +149,7 @@ static void gdm_tty_send_complete(void *arg)
        tty_port_tty_wakeup(&gdm->port);
 }
 
-static int gdm_tty_write(struct tty_struct *tty, const unsigned char *buf,
-                        int len)
+static int gdm_tty_write(struct tty_struct *tty, const u8 *buf, int len)
 {
        struct gdm *gdm = tty->driver_data;
        int remain = len;
index 20a3459..97c7ddd 100644 (file)
@@ -427,8 +427,7 @@ static void gb_tty_hangup(struct tty_struct *tty)
        tty_port_hangup(&gb_tty->port);
 }
 
-static int gb_tty_write(struct tty_struct *tty, const unsigned char *buf,
-                       int count)
+static int gb_tty_write(struct tty_struct *tty, const u8 *buf, int count)
 {
        struct gb_tty *gb_tty = tty->driver_data;
 
index c06ad0a..1dd8b86 100644 (file)
@@ -741,7 +741,7 @@ static void rs_flush_chars(struct tty_struct *tty)
        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;
        struct serial_state *info = tty->driver_data;
index 8595483..de36347 100644 (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
  * too much data.
  */
-static int ehv_bc_tty_write(struct tty_struct *ttys, const unsigned char *s,
-                           int count)
+static int ehv_bc_tty_write(struct tty_struct *ttys, const u8 *s, int count)
 {
        struct ehv_bc_data *bc = ttys->driver_data;
        unsigned long flags;
index d02de3f..faa597f 100644 (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,
-                                 unsigned int count)
+static void goldfish_tty_do_write(int line, const u8 *buf, unsigned int count)
 {
        struct goldfish_tty *qtty = &goldfish_ttys[line];
        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);
 }
 
-static int goldfish_tty_write(struct tty_struct *tty, const unsigned char *buf,
-                                                               int count)
+static int goldfish_tty_write(struct tty_struct *tty, const u8 *buf, int count)
 {
        goldfish_tty_do_write(tty->index, buf, count);
        return count;
index 10c10cf..4c60d15 100644 (file)
@@ -496,7 +496,7 @@ static int hvc_push(struct hvc_struct *hp)
        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;
        unsigned long flags;
index 1de1a09..2465d61 100644 (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
  * terminates our device.
  */
-static int hvcs_write(struct tty_struct *tty,
-               const unsigned char *buf, int count)
+static int hvcs_write(struct tty_struct *tty, const u8 *buf, int count)
 {
        struct hvcs_struct *hvcsd = tty->driver_data;
        unsigned int unit_address;
index c1b8a4f..46dd62d 100644 (file)
@@ -904,8 +904,7 @@ static unsigned int hvsi_chars_in_buffer(struct tty_struct *tty)
        return hp->n_outbuf;
 }
 
-static int hvsi_write(struct tty_struct *tty,
-                    const unsigned char *source, int count)
+static int hvsi_write(struct tty_struct *tty, const u8 *source, int count)
 {
        struct hvsi_struct *hp = tty->driver_data;
        unsigned long flags;
index f5d3e68..001ec31 100644 (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,
-                           const unsigned char *data, unsigned int length,
+                           const u8 *data, unsigned int length,
                            void (*callback) (void *cb, unsigned int length),
                            void *callback_data)
 {
index 9edd5ae..cd43208 100644 (file)
@@ -186,8 +186,7 @@ static void ipw_write_packet_sent_callback(void *callback_data,
        tty->tx_bytes_queued -= packet_length;
 }
 
-static int ipw_write(struct tty_struct *linux_tty,
-                    const unsigned char *buf, int count)
+static int ipw_write(struct tty_struct *linux_tty, const u8 *buf, int count)
 {
        struct ipw_tty *tty = linux_tty->driver_data;
        int room, ret;
index e81701a..cf4ef0c 100644 (file)
@@ -796,8 +796,8 @@ static void mips_ejtag_fdc_tty_hangup(struct tty_struct *tty)
        tty_port_hangup(tty->port);
 }
 
-static int mips_ejtag_fdc_tty_write(struct tty_struct *tty,
-                                   const unsigned char *buf, int total)
+static int mips_ejtag_fdc_tty_write(struct tty_struct *tty, const u8 *buf,
+                                   int total)
 {
        int count, block;
        struct mips_ejtag_fdc_tty_port *dport = tty->driver_data;
index 42fa4c8..d94cf1b 100644 (file)
@@ -487,7 +487,7 @@ module_param(ttymajor, int, 0);
  */
 static int moxa_open(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 void moxa_flush_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);
 }
 
-static int moxa_write(struct tty_struct *tty,
-                     const unsigned char *buf, int count)
+static int moxa_write(struct tty_struct *tty, const u8 *buf, int count)
 {
        struct moxa_port *ch = tty->driver_data;
        unsigned long flags;
@@ -2164,8 +2163,7 @@ static int MoxaPortLineStatus(struct moxa_port *port)
        return val;
 }
 
-static int MoxaPortWriteData(struct tty_struct *tty,
-               const unsigned char *buffer, int len)
+static int MoxaPortWriteData(struct tty_struct *tty, const u8 *buffer, int len)
 {
        struct moxa_port *port = tty->driver_data;
        void __iomem *baseAddr, *ofsAddr, *ofs;
index 10855e6..8b4b849 100644 (file)
@@ -901,7 +901,7 @@ static void mxser_close(struct tty_struct *tty, struct file *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;
        unsigned long flags;
index a3bd1fc..d167e36 100644 (file)
@@ -4256,8 +4256,7 @@ static void gsmtty_hangup(struct tty_struct *tty)
        gsm_dlci_begin_close(dlci);
 }
 
-static int gsmtty_write(struct tty_struct *tty, const unsigned char *buf,
-                                                                   int len)
+static int gsmtty_write(struct tty_struct *tty, const u8 *buf, int len)
 {
        int sent;
        struct gsm_dlci *dlci = tty->driver_data;
index 0454c78..b375640 100644 (file)
@@ -1599,8 +1599,7 @@ static void ntty_hangup(struct tty_struct *tty)
  * 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.
  */
-static int ntty_write(struct tty_struct *tty, const unsigned char *buffer,
-                     int count)
+static int ntty_write(struct tty_struct *tty, const u8 *buffer, int count)
 {
        int rval = -EINVAL;
        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)
                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);
        /* CTS is only valid on the modem channel */
index 2b1c8ab..335f574 100644 (file)
@@ -108,7 +108,7 @@ static void pty_unthrottle(struct tty_struct *tty)
  *     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;
 
index 55c3c9d..2a04d19 100644 (file)
@@ -304,7 +304,7 @@ static unsigned int kgdb_nmi_tty_write_room(struct tty_struct *tty)
        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;
 
index e31c9b6..33df5b0 100644 (file)
@@ -580,8 +580,7 @@ static void uart_flush_chars(struct tty_struct *tty)
        uart_start(tty);
 }
 
-static int uart_write(struct tty_struct *tty,
-                                       const unsigned char *buf, int count)
+static int uart_write(struct tty_struct *tty, const u8 *buf, int count)
 {
        struct uart_state *state = tty->driver_data;
        struct uart_port *port;
index 4c6366f..c7cecea 100644 (file)
@@ -431,7 +431,7 @@ static void tx_set_idle(struct slgt_info *info);
 static unsigned int tbuf_bytes(struct slgt_info *info);
 static void reset_tbufs(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 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,
-                const unsigned char *buf, int count)
+static int write(struct tty_struct *tty, const u8 *buf, int count)
 {
        int ret = 0;
        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
  * 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 int i;
index 1d44384..6b74eba 100644 (file)
@@ -29,8 +29,7 @@ static void ttynull_hangup(struct tty_struct *tty)
        tty_port_hangup(&ttynull_port);
 }
 
-static int ttynull_write(struct tty_struct *tty, const unsigned char *buf,
-                        int count)
+static int ttynull_write(struct tty_struct *tty, const u8 *buf, int count)
 {
        return count;
 }
index 34ba6e5..c223879 100644 (file)
@@ -804,8 +804,7 @@ static void vcc_hangup(struct tty_struct *tty)
        tty_port_hangup(tty->port);
 }
 
-static int vcc_write(struct tty_struct *tty, const unsigned char *buf,
-                    int count)
+static int vcc_write(struct tty_struct *tty, const u8 *buf, int count)
 {
        struct vcc_port *port;
        struct vio_vcc *pkt;
index cf77011..2f28612 100644 (file)
@@ -2845,7 +2845,7 @@ static int vc_con_write_normal(struct vc_data *vc, int tc, int c,
 }
 
 /* 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 = {
                .x = -1,
@@ -3238,7 +3238,7 @@ int tioclinux(struct tty_struct *tty, unsigned long arg)
  * /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;
 
index 11da5fb..913b07b 100644 (file)
@@ -789,8 +789,7 @@ static void acm_tty_close(struct tty_struct *tty, struct file *filp)
        tty_port_close(&acm->port, tty, filp);
 }
 
-static int acm_tty_write(struct tty_struct *tty,
-                                       const unsigned char *buf, int count)
+static int acm_tty_write(struct tty_struct *tty, const u8 *buf, int count)
 {
        struct acm *acm = tty->driver_data;
        int stat;
index 1115396..1d08a1d 100644 (file)
@@ -734,7 +734,7 @@ exit:
        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;
        unsigned long   flags;
index d3acc08..f5f2d0e 100644 (file)
@@ -208,9 +208,7 @@ static void dbc_tty_close(struct tty_struct *tty, struct file *file)
        tty_port_close(&port->port, tty, file);
 }
 
-static int dbc_tty_write(struct tty_struct *tty,
-                        const unsigned char *buf,
-                        int count)
+static int dbc_tty_write(struct tty_struct *tty, const u8 *buf, int count)
 {
        struct dbc_port         *port = tty->driver_data;
        unsigned long           flags;
index 7b4805c..51f738e 100644 (file)
@@ -361,8 +361,7 @@ static void serial_cleanup(struct tty_struct *tty)
        module_put(owner);
 }
 
-static int serial_write(struct tty_struct *tty, const unsigned char *buf,
-                                                               int count)
+static int serial_write(struct tty_struct *tty, const u8 *buf, int count)
 {
        struct usb_serial_port *port = tty->driver_data;
        int retval = -ENODEV;
index e000341..a7bd806 100644 (file)
@@ -356,8 +356,7 @@ struct tty_operations {
        void (*close)(struct tty_struct * tty, struct file * filp);
        void (*shutdown)(struct tty_struct *tty);
        void (*cleanup)(struct tty_struct *tty);
-       int  (*write)(struct tty_struct * tty,
-                     const unsigned char *buf, int count);
+       int  (*write)(struct tty_struct *tty, const u8 *buf, int count);
        int  (*put_char)(struct tty_struct *tty, unsigned char ch);
        void (*flush_chars)(struct tty_struct *tty);
        unsigned int (*write_room)(struct tty_struct *tty);
index d73eec1..3b5f840 100644 (file)
@@ -779,7 +779,7 @@ static void rfcomm_tty_close(struct tty_struct *tty, struct file *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_dlc *dlc = dev->dlc;