Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions driver/ch343.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@ static struct usb_interface *g_intf;
static DEFINE_IDR(ch343_minors);
static DEFINE_MUTEX(ch343_minors_lock);

#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
static void ch343_tty_set_termios(struct tty_struct *tty, const struct ktermios *termios_old);
#else
static void ch343_tty_set_termios(struct tty_struct *tty, struct ktermios *termios_old);
#endif

/*
* Look up an ch343 structure by minor. If found and not disconnected, increment
Expand Down Expand Up @@ -1197,7 +1201,11 @@ static int ch343_get(CHIPTYPE chiptype, unsigned int bval, unsigned char *fct, u
return 0;
}

#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
static void ch343_tty_set_termios(struct tty_struct *tty, const struct ktermios *termios_old)
#else
static void ch343_tty_set_termios(struct tty_struct *tty, struct ktermios *termios_old)
#endif
{
struct ch343 *ch343 = tty->driver_data;
struct ktermios *termios = &tty->termios;
Expand Down