Skip to content

Commit 37999b2

Browse files
authored
Merge pull request #74 from saurontech/driver_dir
fix build for RHEL 9.2
2 parents f43dc0e + 1d1dab7 commit 37999b2

2 files changed

Lines changed: 23 additions & 1 deletion

File tree

driver/legacy/uart/adv_uart_set_termios.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,19 @@
2929
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,1,0)
3030
//@ current
3131
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0)
32+
# if defined(RHEL_RELEASE_CODE)
33+
# if RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9,2)
34+
# define _BACK_PORT_6_1_0
35+
# endif
36+
# endif
37+
# ifdef _BACK_PORT_6_1_0
3238
void adv_uart_set_termios(struct uart_port *port, struct ktermios *termios,
33-
struct ktermios *old)
39+
const struct ktermios *old)
40+
# else
41+
void adv_uart_set_termios(struct uart_port *port, struct ktermios *termios,
42+
struct ktermios *old)
43+
# endif
44+
#undef _BACK_PORT_6_1_0
3445
{
3546
struct adv_uart_port * up = (struct adv_uart_port *)port;
3647
struct adv_port_att * adv_attr = up->attr;

driver/legacy/uart/adv_uart_set_termios.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,19 @@
33
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,1,0)
44
//@ current
55
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0)
6+
# if defined(RHEL_RELEASE_CODE)
7+
# if RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9,2)
8+
# define _BACK_PORT_6_1_0
9+
# endif
10+
# endif
11+
# ifdef _BACK_PORT_6_1_0
12+
void adv_uart_set_termios(struct uart_port *port, struct ktermios *termios,
13+
const struct ktermios *old);
14+
# else
615
void adv_uart_set_termios(struct uart_port *port, struct ktermios *termios,
716
struct ktermios *old);
17+
# endif
18+
# undef _BACK_PORT_6_1_0
819
#else
920
void adv_uart_set_termios(struct uart_port *port, struct ktermios *termios,
1021
struct ktermios *old);

0 commit comments

Comments
 (0)