Arch has a patch that applies cleanly and allows one to build bbswitch for 5.18. Here's the link: https://raw.githubusercontent.com/archlinux/svntogit-community/packages/bbswitch/trunk/0003-kernel-5.18.patch
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3dd7021076f7c2c94af6ba4311a424beed56c005 commit 3dd7021076f7c2c94af6ba4311a424beed56c005 Author: Pacho Ramos <pacho@gentoo.org> AuthorDate: 2022-05-27 21:22:23 +0000 Commit: Pacho Ramos <pacho@gentoo.org> CommitDate: 2022-05-27 21:23:53 +0000 sys-power/bbswitch: Fix compat with kernel 5.18 Closes: https://bugs.gentoo.org/847481 Thanks-to: Joe Kappus Signed-off-by: Pacho Ramos <pacho@gentoo.org> sys-power/bbswitch/bbswitch-0.8_p20211129.ebuild | 4 +++- sys-power/bbswitch/files/bbswitch-kernel-5.18.patch | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-)