From 8ff472a73ded541cb4dae30d13f7fbc38276e82f Mon Sep 17 00:00:00 2001 From: Beginner-Go <70857188+Beginner-Go@users.noreply.github.com> Date: Sat, 14 May 2022 15:32:22 +0000 Subject: [PATCH] Revert "xr_usb_serial_common:fix build with kernel 5.15" This reverts commit f0baf8da5c25cad1319fee09e30f0e810944a401. --- .../0001-fix-build-with-kernel-5.15.patch | 42 ------------------- 1 file changed, 42 deletions(-) delete mode 100644 libs/xr_usb_serial_common/patches/0001-fix-build-with-kernel-5.15.patch diff --git a/libs/xr_usb_serial_common/patches/0001-fix-build-with-kernel-5.15.patch b/libs/xr_usb_serial_common/patches/0001-fix-build-with-kernel-5.15.patch deleted file mode 100644 index 9a60ed45..00000000 --- a/libs/xr_usb_serial_common/patches/0001-fix-build-with-kernel-5.15.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 1ae852b3cd6a305ca70b7390b6fe32254045fe9f Mon Sep 17 00:00:00 2001 -From: W_Y_CPP <383152993@qq.com> -Date: Wed, 9 Mar 2022 01:38:01 -0500 -Subject: [PATCH] fix build with kernel 5.15 - ---- - xr_usb_serial_common-1a/xr_usb_serial_common.c | 10 ++++++++-- - 1 file changed, 8 insertions(+), 2 deletions(-) - -diff --git a/xr_usb_serial_common-1a/xr_usb_serial_common.c b/xr_usb_serial_common-1a/xr_usb_serial_common.c -index 972a9e7ce..97e0703f8 100644 ---- a/xr_usb_serial_common-1a/xr_usb_serial_common.c -+++ b/xr_usb_serial_common-1a/xr_usb_serial_common.c -@@ -688,8 +688,11 @@ static int xr_usb_serial_tty_write(struct tty_struct *tty, - return stat; - return count; - } -- -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0) -+static unsigned int xr_usb_serial_tty_write_room(struct tty_struct *tty) -+#else - static int xr_usb_serial_tty_write_room(struct tty_struct *tty) -+#endif - { - struct xr_usb_serial *xr_usb_serial = tty->driver_data; - /* -@@ -698,8 +701,11 @@ static int xr_usb_serial_tty_write_room(struct tty_struct *tty) - */ - return xr_usb_serial_wb_is_avail(xr_usb_serial) ? xr_usb_serial->writesize : 0; - } -- -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0) -+static unsigned int xr_usb_serial_tty_chars_in_buffer(struct tty_struct *tty) -+#else - static int xr_usb_serial_tty_chars_in_buffer(struct tty_struct *tty) -+#endif - { - struct xr_usb_serial *xr_usb_serial = tty->driver_data; - /* --- -2.17.1 -