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 6dc952b0df4a9aceb6efa972d9cfba9c3649aa0a..dea39008d93ee341aeb144c7ee6e474164485671 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 6fdc136105659da9b86e7551cc99c4854be5109c..e7a21234b48106654a9c038ffcb3ae0daa759e0e 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 02b0befd676325be065ff23c202bee0117b9e016..e5393b4ba9f87d44da00b8e1a560b4d63ecb4c2b 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 f15be75a3bf3bac0afedaf9a86b2118f033fdf9d..8354024b6b354e0856880ea516e2be065e584afa 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 b40b73809dd89614a851619e5af29e7824f0c95e..182ec57e2d5c7de9e4232100de631f43c62e4695 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 ed45d04905c256b7ec861b829bb170df7fea553d..4f3dd93f1fd82ea47dd64bfef6d74fa44a269e40 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 a01c15812b702211a418ffc55d9bc00bf7e3447e..c3cf086e7e369f0a65bd7889bedfb7158236333f 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 45a4043c504209fa5fd33f19b3b4312fadd92089..cf6daf79c1a243ac1e9a6a40602f4c17dd5bba14 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 6669625ba4c8d58eb8584559a495990aa695f93f..44851b607cce591ffd821b780eddc3b375c0f2fa 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 aa659758563f16c5fa521983d93a19f830f9904d..90d2fe00c0b9195cf8203dd601fb6face01cb378 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 ce1f6081d582f4319bb961a87904b8a6a143db0c..014a9d29bab55e115531c4df80a1235ae753287a 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 a1fef666c9b08c8404a70a702dc5fa2ee245eb35..16b6f430dfd3d7d6eb675473caaa8c838f79d535 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 d9983550062d7216615d050fbf39d015660818d7..123524bff73428a5ea0917832d4caed21d097aa7 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 971fbb52740bf4ce2f135b7229da2cd6ef7ed6ae..cc0f6a97124ea178656497348762eb1b4d450d9e 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 a32f34a1c6d27f19d07551c2191ae3d28632b9a6..44974d801c1e1d40abaa7e3f886c6cfcd94e58cb 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 e1a84d6020f482d0a9e4e0dbf26462cb9775d498..ae9978b73d9b87c161acc076d161dc84d7d09243 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 20a34599859f4ef3949c91d94505ecf3f4153e69..97c7ddd0f53ebc920b43d866d22a3dacabd64b3a 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 c06ad0a0744bbe117a9f8dfc901a775841c0b8a6..1dd8b86f4a32f0f0a41d0c369c720e69efbd7a43 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 8595483f4697751fb1ffcb203d3ad3b9711988d5..de36347e2145fd910a85994386e05c8675e974d8 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 d02de3f0326fbbc2fa588cdc890e3f5a2b4cf4e6..faa597ffbaf91e01268530bbee01c66abb545e96 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 10c10cfdf92a1f560be3367367188a76bab84ddd..4c60d15c7a6fd9aa361e79f8d6cd391741fb828b 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 1de1a09bf82d9322f41d5f18932f9fa744c66805..2465d61b4e76ff5bcf51fe43ae1f110061aff2d1 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 c1b8a4fd8b1eeeb4d8e897038645bf73efac25fc..46dd62df24421f9164289ee8099dd4d8a27533f9 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 f5d3e68f575071c1fb3cc32f114202688ca67be2..001ec318a9188bcd4f3b7e86546a7051832ab45c 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 9edd5ae175803e79989cb8d320e48e8bb2ee8491..cd43208c523caba7b7c16e32f764a039b2221f21 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 e81701a6642956690d0f781e0afeaabb81fe2c25..cf4ef0c38624450e921b441620952ec1b60dbc3a 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 42fa4c878b2eb349cbc645a84d013e1ded1f5e8b..d94cf1be651bc63a43b1941d863016ef47ba815f 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 10855e66fda167dcb6ebb0a0cfd64c6e07f24062..8b4b8493fed5822cab22b0e01264d7be3e023c79 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 a3bd1fc52aedebbfdb7f90dac9d2b02ced11666a..d167e36873fe692d6e69d38765b2ce583fce1092 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 0454c78deee6976e54d4f1485f1e44fbf024d2f1..b3756402f5d9fb2c376e5fee89cd4b873b219e96 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 2b1c8ab99dbaf2b293688f259e04ab459a5aaf14..335f5744f320c0bf17942b0a23065257459601ab 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 55c3c9db7462d7d3d2ea4cd9e5711272875c93bd..2a04d19d5ec08d92cc28e4926a09aecb1d220094 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 e31c9b6bd8ab8f5d5bfb9aa53891f889758b12b4..33df5b08d992d7cd324fe9772bfa28d1279e21e2 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 4c6366fe015cbc1a4bd589b36356c4bc242a0e8c..c7cecea38ca88f17134d42116e1822faf22ff975 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 1d4438472442addab213243a75d5509d6b48cb2c..6b74ebaa0f2d19c8f52f85687b4aa620751a36c1 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 34ba6e54789a7fafbadb9334c788f18984c60771..c223879039b86570d413fc9267a16d791afd8289 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 cf77011a8f4e6843d08a35ea5334a6bdfd90abc3..2f28612aee911d7ecf437788283c04df72ef5a26 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 11da5fb284d0a10f1fa4be7e94cb9e0af688f0ff..913b07b30d332fdc12306b883b03e43887d790f6 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 1115396b46a0a65ab137f6b7d5fe32a9fed533c5..1d08a1d8d3cd4084fc5c32520db252232d7d0d81 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 d3acc0829ee5ab4779049a6328edaed0b0ad62fa..f5f2d0e12e6907c21bdbbcb99155fbe8083481e6 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 7b4805c1004db5d3888b9b915f8183397e81a2cb..51f738ea3f77dca8718358a7697f68204f2ad48d 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 e00034118c7bcaee786d638b5f7a8f58c3d812d0..a7bd8060ac961c5daf95f306794172dc6706f85c 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 d73eec1465297efc4e407969eae9662286dc25bd..3b5f8404dc84e4a6b75a3e46803a77e609c2af00 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;