From 3df2bfaac72985ef1673175f1861c61ec580983a Mon Sep 17 00:00:00 2001 From: John Klug Date: Tue, 24 May 2022 10:40:48 -0500 Subject: Remove obsolete vizzini code and use tty_port_initialized --- .../vizzini/vizzini-1.1/vizzini-1.1-ttyinit.patch | 30 ++++++++++++++++++++++ recipes-kernel/vizzini/vizzini_1.1.bb | 3 ++- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 recipes-kernel/vizzini/vizzini-1.1/vizzini-1.1-ttyinit.patch diff --git a/recipes-kernel/vizzini/vizzini-1.1/vizzini-1.1-ttyinit.patch b/recipes-kernel/vizzini/vizzini-1.1/vizzini-1.1-ttyinit.patch new file mode 100644 index 0000000..139951f --- /dev/null +++ b/recipes-kernel/vizzini/vizzini-1.1/vizzini-1.1-ttyinit.patch @@ -0,0 +1,30 @@ +diff -Naru orig/vizzini.c new/vizzini.c +--- orig/vizzini.c 2022-05-24 09:28:33.792414903 -0500 ++++ new/vizzini.c 2022-05-24 09:28:59.064414312 -0500 +@@ -1855,7 +1855,7 @@ + if (cnt) + return 0; + +- if (test_bit(ASYNCB_INITIALIZED, &xr21v141x->port.flags)) ++ if (tty_port_initialized(&xr21v141x->port)) + stop_data_traffic(xr21v141x); + + return 0; +@@ -1876,7 +1876,7 @@ + if (cnt) + return 0; + +- if (test_bit(ASYNCB_INITIALIZED, &xr21v141x->port.flags)) { ++ if (tty_port_initialized(&xr21v141x->port)) { + rv = usb_submit_urb(xr21v141x->ctrlurb, GFP_NOIO); + + spin_lock_irq(&xr21v141x->write_lock); +@@ -1907,7 +1907,7 @@ + { + struct xr21v141x *xr21v141x = usb_get_intfdata(intf); + +- if (test_bit(ASYNCB_INITIALIZED, &xr21v141x->port.flags)) ++ if (tty_port_initialized(&xr21v141x->port)) + tty_port_tty_hangup(&xr21v141x->port, false); + + diff --git a/recipes-kernel/vizzini/vizzini_1.1.bb b/recipes-kernel/vizzini/vizzini_1.1.bb index 93eb74b..af26b95 100644 --- a/recipes-kernel/vizzini/vizzini_1.1.bb +++ b/recipes-kernel/vizzini/vizzini_1.1.bb @@ -1,11 +1,12 @@ require vizzini.inc -PR = "r1.1" +PR = "r1.2" PKGR = "${PR}${KERNEL_MODULE_PACKAGE_SUFFIX}${EXTENDPRAUTO}" SRC_URI += "file://xr21v141x-lnx3.10-3.11.tar.gz \ file://vizzini-1.1-enable-cts-v2.patch \ file://vizzini-1.1-rs485.patch \ + file://vizzini-1.1-ttyinit.patch \ " SRC_URI_append_mtre = "file://vizzini-1.1-ledrtig.patch \ " -- cgit v1.2.3