Skip to content

Commit dc73e2b

Browse files
authored
Merge pull request #4 from saurontech/RHEL9
add support for RHEL 9.0
2 parents 71b9020 + 7e45dc2 commit dc73e2b

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

driver/xr_usb_serial_common.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -767,8 +767,15 @@ static int xr_usb_serial_tty_write(struct tty_struct *tty,
767767
return stat;
768768
return count;
769769
}
770+
770771
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,15,0)
771772
static unsigned int xr_usb_serial_tty_write_room(struct tty_struct *tty)
773+
#elif defined(RHEL_RELEASE_CODE)
774+
# if RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9,0)
775+
static unsigned int xr_usb_serial_tty_write_room(struct tty_struct *tty)
776+
# else
777+
static int xr_usb_serial_tty_write_room(struct tty_struct *tty)
778+
# endif
772779
#else
773780
static int xr_usb_serial_tty_write_room(struct tty_struct *tty)
774781
#endif
@@ -782,6 +789,13 @@ static int xr_usb_serial_tty_write_room(struct tty_struct *tty)
782789
}
783790
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,15,0)
784791
static unsigned int xr_usb_serial_tty_chars_in_buffer(struct tty_struct *tty)
792+
#elif defined(RHEL_RELEASE_CODE)
793+
# if RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9,0)
794+
static unsigned int xr_usb_serial_tty_chars_in_buffer(struct tty_struct *tty)
795+
# else
796+
static int xr_usb_serial_tty_chars_in_buffer(struct tty_struct *tty)
797+
798+
# endif
785799
#else
786800
static int xr_usb_serial_tty_chars_in_buffer(struct tty_struct *tty)
787801
#endif

0 commit comments

Comments
 (0)