From: "Pacho Ramos" <pacho@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-power/bbswitch/files/, sys-power/bbswitch/
Date: Fri, 27 May 2022 21:24:02 +0000 (UTC) [thread overview]
Message-ID: <1653686633.3dd7021076f7c2c94af6ba4311a424beed56c005.pacho@gentoo> (raw)
commit: 3dd7021076f7c2c94af6ba4311a424beed56c005
Author: Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Fri May 27 21:22:23 2022 +0000
Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Fri May 27 21:23:53 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3dd70210
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 <AT> 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(-)
diff --git a/sys-power/bbswitch/bbswitch-0.8_p20211129.ebuild b/sys-power/bbswitch/bbswitch-0.8_p20211129.ebuild
index 63147964328f..2aa21af88733 100644
--- a/sys-power/bbswitch/bbswitch-0.8_p20211129.ebuild
+++ b/sys-power/bbswitch/bbswitch-0.8_p20211129.ebuild
@@ -1,7 +1,7 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
inherit linux-mod toolchain-funcs
@@ -31,6 +31,8 @@ RDEPEND=""
MODULE_NAMES="bbswitch(acpi)"
+PATCHES=( "${FILESDIR}/${PN}-kernel-5.18.patch" )
+
pkg_setup() {
linux-mod_pkg_setup
diff --git a/sys-power/bbswitch/files/bbswitch-kernel-5.18.patch b/sys-power/bbswitch/files/bbswitch-kernel-5.18.patch
new file mode 100644
index 000000000000..07cecd4cdf41
--- /dev/null
+++ b/sys-power/bbswitch/files/bbswitch-kernel-5.18.patch
@@ -0,0 +1,19 @@
+diff -u -r bbswitch-0.8/bbswitch.c bbswitch-0.8-5.18/bbswitch.c
+--- bbswitch-0.8/bbswitch.c 2022-05-24 20:26:22.184553495 +0000
++++ bbswitch-0.8-5.18/bbswitch.c 2022-05-24 20:29:00.797008130 +0000
+@@ -264,10 +264,15 @@
+ pci_disable_device(dis_dev);
+ do {
+ struct acpi_device *ad = NULL;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0)
++ ad = acpi_fetch_acpi_dev(dis_handle);
++ if (!ad) {
++#else
+ int r;
+
+ r = acpi_bus_get_device(dis_handle, &ad);
+ if (r || !ad) {
++#endif
+ pr_warn("Cannot get ACPI device for PCI device\n");
+ break;
+ }
next reply other threads:[~2022-05-27 21:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-27 21:24 Pacho Ramos [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-04-06 18:42 [gentoo-commits] repo/gentoo:master commit in: sys-power/bbswitch/files/, sys-power/bbswitch/ Piotr Karbowski
2017-07-24 20:42 NP Hardass
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1653686633.3dd7021076f7c2c94af6ba4311a424beed56c005.pacho@gentoo \
--to=pacho@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox