mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
tty: Replace unsigned char to u8 for Linux 6.6
Based on following change, replace the unsigned char to u8 for serial:wch_serial. -- commit dcaafbe6ee3b39f2df11a1352f85172f8ade17a5 Author: Jiri Slaby (SUSE) <jirislaby@kernel.org> tty: propagate u8 data to tty_operations::put_char() --- Bug 4346767 Change-Id: I2555383d59fe8c95a7a1b6220e3209138416c2eb Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3007447 Tested-by: Bitan Biswas <bbiswas@nvidia.com> Reviewed-by: Bitan Biswas <bbiswas@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
a8dd4a4375
commit
43e89a0862
3
Makefile
3
Makefile
@@ -34,6 +34,9 @@ subdir-ccflags-y += -DNV_SND_SOC_DAI_OPS_STRUCT_HAS_PROBE_ARG
|
||||
|
||||
# probe_new is removed from i2c driver structure
|
||||
subdir-ccflags-y += -DNV_I2C_LEGACY_PROBE_NEW_REMOVED
|
||||
|
||||
# API changes to replace u8 with unsigned char
|
||||
subdir-ccflags-y += -DNV_TTY_SERIAL_TYPE_U8_CHANGE
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_TEGRA_VIRTUALIZATION),y)
|
||||
|
||||
@@ -54,7 +54,11 @@ static void ser_tasklet_action(unsigned long);
|
||||
static int ser_startup(struct ser_state *, int);
|
||||
static void ser_shutdown(struct ser_state *);
|
||||
static _INLINE_ void _ser_put_char(struct ser_port *, struct circ_buf *, unsigned char);
|
||||
#if defined(NV_TTY_SERIAL_TYPE_U8_CHANGE)
|
||||
static int ser_put_char(struct tty_struct *, u8);
|
||||
#else
|
||||
static int ser_put_char(struct tty_struct *, unsigned char);
|
||||
#endif
|
||||
static void ser_flush_chars(struct tty_struct *);
|
||||
static unsigned int ser_chars_in_buffer(struct tty_struct *tty);
|
||||
static void ser_flush_buffer(struct tty_struct *);
|
||||
@@ -64,7 +68,11 @@ static void ser_unthrottle(struct tty_struct *);
|
||||
static int ser_get_info(struct ser_state *, struct serial_struct *);
|
||||
static int ser_set_info(struct ser_state *, struct serial_struct *);
|
||||
static unsigned int ser_write_room(struct tty_struct *tty);
|
||||
#if defined(NV_TTY_SERIAL_TYPE_U8_CHANGE)
|
||||
static ssize_t ser_write(struct tty_struct *, const u8 *, size_t);
|
||||
#else
|
||||
static int ser_write(struct tty_struct *, const unsigned char *, int);
|
||||
#endif
|
||||
// static int ser_get_lsr_info(struct ser_state *, unsigned int *);
|
||||
static int ser_tiocmget(struct tty_struct *);
|
||||
static int ser_tiocmset(struct tty_struct *, unsigned int, unsigned int);
|
||||
@@ -614,7 +622,11 @@ static _INLINE_ void _ser_put_char(struct ser_port *port, struct circ_buf *circ,
|
||||
spin_unlock_irqrestore(&port->lock, flags);
|
||||
}
|
||||
|
||||
#if defined(NV_TTY_SERIAL_TYPE_U8_CHANGE)
|
||||
static int ser_put_char(struct tty_struct *tty, u8 ch)
|
||||
#else
|
||||
static int ser_put_char(struct tty_struct *tty, unsigned char ch)
|
||||
#endif
|
||||
{
|
||||
struct ser_state *state = NULL;
|
||||
int line = WCH_SER_DEVNUM(tty);
|
||||
@@ -909,7 +921,11 @@ static unsigned int ser_write_room(struct tty_struct *tty)
|
||||
return status;
|
||||
}
|
||||
|
||||
#if defined(NV_TTY_SERIAL_TYPE_U8_CHANGE)
|
||||
static ssize_t ser_write(struct tty_struct *tty, const u8 *buf, size_t count)
|
||||
#else
|
||||
static int ser_write(struct tty_struct *tty, const unsigned char *buf, int count)
|
||||
#endif
|
||||
{
|
||||
struct ser_state *state = tty->driver_data;
|
||||
struct ser_port *port = NULL;
|
||||
|
||||
Reference in New Issue
Block a user