commit:     004bf5c6529441969d8157315c16fa7fcfbd0c41
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 15 10:07:27 2025 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Mon Dec 15 10:18:46 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=004bf5c6

games-util/xpadneo: fix build with kernel 6.18

Upstream did mention they plan to release a fixed 0.10.0 soon'ish
2 weeks ago, but given 6.18.1 dist kernels been added better off
fixing this now.

Patch should be safe enough to not be worth a ~arch revbump, may
help for users accepting ~arch kernels.

Closes: https://bugs.gentoo.org/967493
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 .../xpadneo/files/xpadneo-0.9.7-kernel6.18.patch      | 19 +++++++++++++++++++
 games-util/xpadneo/xpadneo-0.9.7.ebuild               |  4 ++++
 2 files changed, 23 insertions(+)

diff --git a/games-util/xpadneo/files/xpadneo-0.9.7-kernel6.18.patch 
b/games-util/xpadneo/files/xpadneo-0.9.7-kernel6.18.patch
new file mode 100644
index 000000000000..512b4f1c0ef8
--- /dev/null
+++ b/games-util/xpadneo/files/xpadneo-0.9.7-kernel6.18.patch
@@ -0,0 +1,19 @@
+https://bugs.gentoo.org/967493
+https://github.com/atar-axis/xpadneo/issues/562
+https://github.com/atar-axis/xpadneo/pull/566
+--- a/hid-xpadneo/src/hid-xpadneo.c
++++ b/hid-xpadneo/src/hid-xpadneo.c
+@@ -1194,5 +1194,5 @@
+               return -ENOMEM;
+ 
+-      xdata->id = ida_simple_get(&xpadneo_device_id_allocator, 0, 0, 
GFP_KERNEL);
++      xdata->id = ida_alloc(&xpadneo_device_id_allocator, GFP_KERNEL);
+       xdata->quirks = id->driver_data;
+ 
+@@ -1289,5 +1289,5 @@
+ {
+       if (xdata->id >= 0) {
+-              ida_simple_remove(&xpadneo_device_id_allocator, xdata->id);
++              ida_free(&xpadneo_device_id_allocator, xdata->id);
+               xdata->id = -1;
+       }

diff --git a/games-util/xpadneo/xpadneo-0.9.7.ebuild 
b/games-util/xpadneo/xpadneo-0.9.7.ebuild
index 1daeda7486f6..c75573bbdf51 100644
--- a/games-util/xpadneo/xpadneo-0.9.7.ebuild
+++ b/games-util/xpadneo/xpadneo-0.9.7.ebuild
@@ -22,6 +22,10 @@ SLOT="0"
 
 CONFIG_CHECK="INPUT_FF_MEMLESS"
 
+PATCHES=(
+       "${FILESDIR}"/${P}-kernel6.18.patch
+)
+
 src_compile() {
        local modlist=( hid-${PN}=kernel/drivers/hid:hid-${PN}:hid-${PN}/src )
        local modargs=( KERNEL_SOURCE_DIR="${KV_OUT_DIR}" )

Reply via email to