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 0000000000000..512b4f1c0ef83 --- /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 1daeda7486f60..c75573bbdf513 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}" )