ch9344: fix build on Linux 6.3

This commit is contained in:
MakiseKurisu 2023-05-11 22:25:07 +08:00
parent 58b1a946a8
commit 9e7fbfbaff
2 changed files with 16 additions and 0 deletions

View File

@ -13,6 +13,9 @@ stdenv.mkDerivation rec {
patches = lib.optionals (lib.versionAtLeast kernel.modDirVersion "6.1") [
# https://github.com/torvalds/linux/commit/a8c11c1520347be74b02312d10ef686b01b525f1
./fix-incompatible-pointer-types.patch
] ++ lib.optionals (lib.versionAtLeast kernel.modDirVersion "6.3") [
# https://github.com/torvalds/linux/commit/5d420399073770134d2b03e004b2c0201c7fa26f
./fix-incompatible-pointer-types_6_3.patch
];
sourceRoot = "${src.name}/driver";

View File

@ -0,0 +1,13 @@
diff --git a/ch9344.c b/ch9344.c
index a16af82..8922ed9 100644
--- a/ch9344.c
+++ b/ch9344.c
@@ -774,7 +774,7 @@ static inline void *tty_get_portdata(struct ch9344_ttyport *port)
return (port->portdata);
}
-static void ch9344_port_dtr_rts(struct tty_port *port, int raise)
+static void ch9344_port_dtr_rts(struct tty_port *port, bool raise)
{
struct ch9344_ttyport *ttyport = container_of(port, struct ch9344_ttyport, port);
struct ch9344 *ch9344 = tty_get_portdata(ttyport);