mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 12:11:40 +00:00
tty: propagate u8 data to tty_operations::put_char()
Data are now typed as u8. Propagate this change to tty_operations::put_char(). Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org> Cc: Geert Uytterhoeven <geert@linux-m68k.org> 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: Karsten Keil <isdn@linux-pingi.de> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Jiri Slaby <jirislaby@kernel.org> 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: Mathias Nyman <mathias.nyman@intel.com> Link: https://lore.kernel.org/r/20230810091510.13006-29-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
69851e4ab8
commit
dcaafbe6ee
@ -76,9 +76,9 @@ static int nfcon_tty_write(struct tty_struct *tty, const u8 *buf, int count)
|
||||
return count;
|
||||
}
|
||||
|
||||
static int nfcon_tty_put_char(struct tty_struct *tty, unsigned char ch)
|
||||
static int nfcon_tty_put_char(struct tty_struct *tty, u8 ch)
|
||||
{
|
||||
char temp[2] = { ch, 0 };
|
||||
u8 temp[2] = { ch, 0 };
|
||||
|
||||
nf_call(stderr_id, virt_to_phys(temp));
|
||||
return 1;
|
||||
|
@ -1111,7 +1111,7 @@ static int capinc_tty_write(struct tty_struct *tty, const u8 *buf, int count)
|
||||
return count;
|
||||
}
|
||||
|
||||
static int capinc_tty_put_char(struct tty_struct *tty, unsigned char ch)
|
||||
static int capinc_tty_put_char(struct tty_struct *tty, u8 ch)
|
||||
{
|
||||
struct capiminor *mp = tty->driver_data;
|
||||
bool invoke_send = false;
|
||||
|
@ -1030,7 +1030,7 @@ static int tty3215_write(struct tty_struct *tty, const u8 *buf, int count)
|
||||
/*
|
||||
* Put character routine for 3215 ttys
|
||||
*/
|
||||
static int tty3215_put_char(struct tty_struct *tty, unsigned char ch)
|
||||
static int tty3215_put_char(struct tty_struct *tty, u8 ch)
|
||||
{
|
||||
struct raw3215_info *raw = tty->driver_data;
|
||||
|
||||
|
@ -1821,7 +1821,7 @@ static int tty3270_write(struct tty_struct *tty, const u8 *buf, int count)
|
||||
/*
|
||||
* Put single characters to the ttys character buffer
|
||||
*/
|
||||
static int tty3270_put_char(struct tty_struct *tty, unsigned char ch)
|
||||
static int tty3270_put_char(struct tty_struct *tty, u8 ch)
|
||||
{
|
||||
struct tty3270 *tp;
|
||||
|
||||
|
@ -48,7 +48,7 @@ static struct sclp_buffer *sclp_ttybuf;
|
||||
static struct timer_list sclp_tty_timer;
|
||||
|
||||
static struct tty_port sclp_port;
|
||||
static unsigned char sclp_tty_chars[SCLP_TTY_BUF_SIZE];
|
||||
static u8 sclp_tty_chars[SCLP_TTY_BUF_SIZE];
|
||||
static unsigned short int sclp_tty_chars_count;
|
||||
|
||||
struct tty_driver *sclp_tty_driver;
|
||||
@ -168,7 +168,7 @@ sclp_tty_timeout(struct timer_list *unused)
|
||||
/*
|
||||
* Write a string to the sclp tty.
|
||||
*/
|
||||
static int sclp_tty_write_string(const unsigned char *str, int count, int may_fail)
|
||||
static int sclp_tty_write_string(const u8 *str, int count, int may_fail)
|
||||
{
|
||||
unsigned long flags;
|
||||
void *page;
|
||||
@ -250,7 +250,7 @@ sclp_tty_write(struct tty_struct *tty, const u8 *buf, int count)
|
||||
* sclp_write() without final '\n' - will be written.
|
||||
*/
|
||||
static int
|
||||
sclp_tty_put_char(struct tty_struct *tty, unsigned char ch)
|
||||
sclp_tty_put_char(struct tty_struct *tty, u8 ch)
|
||||
{
|
||||
sclp_tty_chars[sclp_tty_chars_count++] = ch;
|
||||
if (ch == '\n' || sclp_tty_chars_count >= SCLP_TTY_BUF_SIZE) {
|
||||
|
@ -579,7 +579,7 @@ sclp_vt220_close(struct tty_struct *tty, struct file *filp)
|
||||
* done stuffing characters into the driver.
|
||||
*/
|
||||
static int
|
||||
sclp_vt220_put_char(struct tty_struct *tty, unsigned char ch)
|
||||
sclp_vt220_put_char(struct tty_struct *tty, u8 ch)
|
||||
{
|
||||
return __sclp_vt220_write(&ch, 1, 0, 0, 1);
|
||||
}
|
||||
|
@ -696,7 +696,7 @@ static void change_speed(struct tty_struct *tty, struct serial_state *info,
|
||||
local_irq_restore(flags);
|
||||
}
|
||||
|
||||
static int rs_put_char(struct tty_struct *tty, unsigned char ch)
|
||||
static int rs_put_char(struct tty_struct *tty, u8 ch)
|
||||
{
|
||||
struct serial_state *info;
|
||||
unsigned long flags;
|
||||
|
@ -920,7 +920,7 @@ static int mxser_write(struct tty_struct *tty, const u8 *buf, int count)
|
||||
return written;
|
||||
}
|
||||
|
||||
static int mxser_put_char(struct tty_struct *tty, unsigned char ch)
|
||||
static int mxser_put_char(struct tty_struct *tty, u8 ch)
|
||||
{
|
||||
struct mxser_port *info = tty->driver_data;
|
||||
unsigned long flags;
|
||||
|
@ -551,7 +551,7 @@ uart_get_divisor(struct uart_port *port, unsigned int baud)
|
||||
}
|
||||
EXPORT_SYMBOL(uart_get_divisor);
|
||||
|
||||
static int uart_put_char(struct tty_struct *tty, unsigned char c)
|
||||
static int uart_put_char(struct tty_struct *tty, u8 c)
|
||||
{
|
||||
struct uart_state *state = tty->driver_data;
|
||||
struct uart_port *port;
|
||||
|
@ -780,7 +780,7 @@ cleanup:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int put_char(struct tty_struct *tty, unsigned char ch)
|
||||
static int put_char(struct tty_struct *tty, u8 ch)
|
||||
{
|
||||
struct slgt_info *info = tty->driver_data;
|
||||
unsigned long flags;
|
||||
@ -788,7 +788,7 @@ static int put_char(struct tty_struct *tty, unsigned char ch)
|
||||
|
||||
if (sanity_check(info, tty->name, "put_char"))
|
||||
return 0;
|
||||
DBGINFO(("%s put_char(%d)\n", info->device_name, ch));
|
||||
DBGINFO(("%s put_char(%u)\n", info->device_name, ch));
|
||||
if (!info->tx_buf)
|
||||
return 0;
|
||||
spin_lock_irqsave(&info->lock,flags);
|
||||
|
@ -3248,7 +3248,7 @@ static int con_write(struct tty_struct *tty, const u8 *buf, int count)
|
||||
return retval;
|
||||
}
|
||||
|
||||
static int con_put_char(struct tty_struct *tty, unsigned char ch)
|
||||
static int con_put_char(struct tty_struct *tty, u8 ch)
|
||||
{
|
||||
return do_con_write(tty, &ch, 1);
|
||||
}
|
||||
|
@ -753,7 +753,7 @@ static int gs_write(struct tty_struct *tty, const u8 *buf, int count)
|
||||
return count;
|
||||
}
|
||||
|
||||
static int gs_put_char(struct tty_struct *tty, unsigned char ch)
|
||||
static int gs_put_char(struct tty_struct *tty, u8 ch)
|
||||
{
|
||||
struct gs_port *port = tty->driver_data;
|
||||
unsigned long flags;
|
||||
|
@ -222,7 +222,7 @@ static int dbc_tty_write(struct tty_struct *tty, const u8 *buf, int count)
|
||||
return count;
|
||||
}
|
||||
|
||||
static int dbc_tty_put_char(struct tty_struct *tty, unsigned char ch)
|
||||
static int dbc_tty_put_char(struct tty_struct *tty, u8 ch)
|
||||
{
|
||||
struct dbc_port *port = tty->driver_data;
|
||||
unsigned long flags;
|
||||
|
@ -357,7 +357,7 @@ struct tty_operations {
|
||||
void (*shutdown)(struct tty_struct *tty);
|
||||
void (*cleanup)(struct tty_struct *tty);
|
||||
int (*write)(struct tty_struct *tty, const u8 *buf, int count);
|
||||
int (*put_char)(struct tty_struct *tty, unsigned char ch);
|
||||
int (*put_char)(struct tty_struct *tty, u8 ch);
|
||||
void (*flush_chars)(struct tty_struct *tty);
|
||||
unsigned int (*write_room)(struct tty_struct *tty);
|
||||
unsigned int (*chars_in_buffer)(struct tty_struct *tty);
|
||||
|
Loading…
Reference in New Issue
Block a user