diff -Nru ddcci-driver-linux-0.4.1/debian/changelog ddcci-driver-linux-0.4.1/debian/changelog --- ddcci-driver-linux-0.4.1/debian/changelog 2021-11-25 15:33:56.000000000 +0000 +++ ddcci-driver-linux-0.4.1/debian/changelog 2023-06-08 12:47:03.000000000 +0000 @@ -1,3 +1,11 @@ +ddcci-driver-linux (0.4.1-3ubuntu2) jammy; urgency=medium + + * Support Linux 6.2 (LP: #2023293): + - debian/patches/skip-if-no-config-i2c.patch + - debian/patches/linux-6.1.patch + + -- Andrea Righi Thu, 08 Jun 2023 12:47:03 +0000 + ddcci-driver-linux (0.4.1-3ubuntu1) jammy; urgency=medium [ Andrea Righi ] diff -Nru ddcci-driver-linux-0.4.1/debian/patches/linux-6.1.patch ddcci-driver-linux-0.4.1/debian/patches/linux-6.1.patch --- ddcci-driver-linux-0.4.1/debian/patches/linux-6.1.patch 1970-01-01 00:00:00.000000000 +0000 +++ ddcci-driver-linux-0.4.1/debian/patches/linux-6.1.patch 2023-06-08 12:43:02.000000000 +0000 @@ -0,0 +1,34 @@ +commit ed3866410d6bde7cf176df3c75122a13143d0c40 +Author: Ivan Kulagin +Date: Sat Dec 24 21:11:15 2022 +0000 + + Fix build for Linux 6.1 + +--- a/ddcci/ddcci.c ++++ b/ddcci/ddcci.c +@@ -1789,6 +1789,13 @@ + return 0; + } + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) ++static void ddcci_remove_void(struct i2c_client *client) ++{ ++ ddcci_remove(client); ++} ++#endif ++ + /* + * I2C driver device identification table. + */ +@@ -1810,7 +1817,11 @@ + + .id_table = ddcci_idtable, + .probe = ddcci_probe, ++ #if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) ++ .remove = ddcci_remove_void, ++ #else + .remove = ddcci_remove, ++ #endif + .class = I2C_CLASS_DDC, + .detect = ddcci_detect, + .address_list = I2C_ADDRS( diff -Nru ddcci-driver-linux-0.4.1/debian/patches/series ddcci-driver-linux-0.4.1/debian/patches/series --- ddcci-driver-linux-0.4.1/debian/patches/series 2021-11-25 15:28:49.000000000 +0000 +++ ddcci-driver-linux-0.4.1/debian/patches/series 2023-06-08 12:43:02.000000000 +0000 @@ -1,3 +1,5 @@ 0002-Skip-build-if-BACKLIGHT_CLASS_DEVICE-off.patch pre-5.1-static_assert.patch 0010-fix-build-error-with-linux-5.15.patch +skip-if-no-config-i2c.patch +linux-6.1.patch diff -Nru ddcci-driver-linux-0.4.1/debian/patches/skip-if-no-config-i2c.patch ddcci-driver-linux-0.4.1/debian/patches/skip-if-no-config-i2c.patch --- ddcci-driver-linux-0.4.1/debian/patches/skip-if-no-config-i2c.patch 1970-01-01 00:00:00.000000000 +0000 +++ ddcci-driver-linux-0.4.1/debian/patches/skip-if-no-config-i2c.patch 2023-06-08 12:42:52.000000000 +0000 @@ -0,0 +1,14 @@ +Description: Skip the build if CONFIG_I2C is disabled +Author: Stephen Kitt + +--- a/dkms.conf ++++ b/dkms.conf +@@ -14,3 +14,8 @@ + echo "BACKLIGHT_CLASS_DEVICE disabled in this kernel, not building module." >&2 + BUILD_EXCLUSIVE_ARCH="^do_not_build$" + fi ++# Don't build module when I2C is disabled ++if ! grep -q "^CONFIG_I2C=[ym]$" "$kernel_source_dir/.config" 2>/dev/null ; then ++ echo "I2C disabled in this kernel, not building module." >&2 ++ BUILD_EXCLUSIVE_ARCH="^do_not_build$" ++fi