ch9344: 0-unstable-2024-11-15 -> 2.3

Also transfer maintainership to @RadxaYuntian.
This commit is contained in:
ZHANG Yuntian
2025-06-25 11:14:38 +08:00
parent 106aed9f99
commit b84f8e6e03
2 changed files with 21 additions and 4 deletions
+5 -4
View File
@@ -7,17 +7,18 @@
stdenv.mkDerivation rec {
pname = "ch9344";
version = "0-unstable-2024-11-15";
version = "2.3";
src = fetchFromGitHub {
owner = "WCHSoftGroup";
repo = "ch9344ser_linux";
rev = "4ea8973886989d67acdd01dba213e355eacc9088";
hash = "sha256-ZZ/8s26o7wRwHy6c0m1vZ/DtRW5od+NgiU6aXZBVfc4=";
rev = "e0a38c4f4f9d4c1f5e2e3a352b7b1010b33aa322";
hash = "sha256-ldYoGmG9DAjASl3xL8djeZ8jRHlcBQdAt0KYAr53epI=";
};
patches = [
./fix-linux-6-12-build.patch
./fix-linux-6-15-build.patch
];
sourceRoot = "${src.name}/driver";
@@ -47,6 +48,6 @@ stdenv.mkDerivation rec {
'';
license = licenses.gpl2Only;
platforms = platforms.linux;
maintainers = with maintainers; [ MakiseKurisu ];
maintainers = with maintainers; [ RadxaYuntian ];
};
}
@@ -0,0 +1,16 @@
diff --git a/ch9344.c b/ch9344.c
index 36402c0..cb3efc2 100644
--- a/ch9344.c
+++ b/ch9344.c
@@ -1251,7 +1251,11 @@ static void ch9344_port_shutdown(struct tty_port *port)
struct ch9344 *ch9344 = tty_get_portdata(ttyport);
int portnum = ttyport->portnum;
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0))
+ timer_delete(&ttyport->timer);
+#else
del_timer(&ttyport->timer);
+#endif
ch9344_set_control(ch9344, portnum, 0x00);
ch9344_set_control(ch9344, portnum, 0x10);
ttyport->isopen = false;