Skip to content

Commit

Permalink
Merge pull request #74 from saurontech/driver_dir
Browse files Browse the repository at this point in the history
fix build for RHEL 9.2
  • Loading branch information
saurontech authored Aug 16, 2023
2 parents f43dc0e + 1d1dab7 commit 37999b2
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
13 changes: 12 additions & 1 deletion driver/legacy/uart/adv_uart_set_termios.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,19 @@
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,1,0)
//@ current
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0)
# if defined(RHEL_RELEASE_CODE)
# if RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9,2)
# define _BACK_PORT_6_1_0
# endif
# endif
# ifdef _BACK_PORT_6_1_0
void adv_uart_set_termios(struct uart_port *port, struct ktermios *termios,
struct ktermios *old)
const struct ktermios *old)
# else
void adv_uart_set_termios(struct uart_port *port, struct ktermios *termios,
struct ktermios *old)
# endif
#undef _BACK_PORT_6_1_0
{
struct adv_uart_port * up = (struct adv_uart_port *)port;
struct adv_port_att * adv_attr = up->attr;
Expand Down
11 changes: 11 additions & 0 deletions driver/legacy/uart/adv_uart_set_termios.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,19 @@
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,1,0)
//@ current
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0)
# if defined(RHEL_RELEASE_CODE)
# if RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9,2)
# define _BACK_PORT_6_1_0
# endif
# endif
# ifdef _BACK_PORT_6_1_0
void adv_uart_set_termios(struct uart_port *port, struct ktermios *termios,
const struct ktermios *old);
# else
void adv_uart_set_termios(struct uart_port *port, struct ktermios *termios,
struct ktermios *old);
# endif
# undef _BACK_PORT_6_1_0
#else
void adv_uart_set_termios(struct uart_port *port, struct ktermios *termios,
struct ktermios *old);
Expand Down

0 comments on commit 37999b2

Please sign in to comment.