From: Stephen Rothwell <sfr@canb•auug.org.au>
To: Hans de Goede <hdegoede@redhat•com>, Mark Gross <markgross@kernel•org>
Cc: "Ricardo B. Marliere" <ricardo@marliere•net>,
"Armin Wolf" <W_Armin@gmx•de>,
"Ilpo Järvinen" <ilpo.jarvinen@linux•intel.com>,
"Linux Kernel Mailing List" <linux-kernel@vger•kernel.org>,
"Linux Next Mailing List" <linux-next@vger•kernel.org>
Subject: linux-next: manual merge of the drivers-x86 tree with Linus' tree
Date: Thu, 8 Feb 2024 12:57:44 +1100 [thread overview]
Message-ID: <20240208125744.300635a2@canb.auug.org.au> (raw)
[-- Attachment #1: Type: text/plain, Size: 3070 bytes --]
Hi all,
Today's linux-next merge of the drivers-x86 tree got a conflict in:
drivers/platform/x86/wmi.c
between commit:
3ea7f59af8ff ("platform/x86: wmi: Decouple legacy WMI notify handlers from wmi_block_list")
from Linus' tree and commit:
10fdfd13a359 ("platform: x86: wmi: make wmi_bus_type const")
from the drivers-x86 tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
--
Cheers,
Stephen Rothwell
diff --cc drivers/platform/x86/wmi.c
index 3c288e8f404b,5682c7de0394..000000000000
--- a/drivers/platform/x86/wmi.c
+++ b/drivers/platform/x86/wmi.c
@@@ -221,18 -219,7 +221,18 @@@ static int wmidev_match_guid(struct dev
return 0;
}
+static int wmidev_match_notify_id(struct device *dev, const void *data)
+{
+ struct wmi_block *wblock = dev_to_wblock(dev);
+ const u32 *notify_id = data;
+
+ if (wblock->gblock.flags & ACPI_WMI_EVENT && wblock->gblock.notify_id == *notify_id)
+ return 1;
+
+ return 0;
+}
+
- static struct bus_type wmi_bus_type;
+ static const struct bus_type wmi_bus_type;
static struct wmi_device *wmi_find_device_by_guid(const char *guid_string)
{
@@@ -1233,20 -1179,30 +1233,19 @@@ static int wmi_notify_device(struct dev
if (!(wblock->gblock.flags & ACPI_WMI_EVENT && wblock->gblock.notify_id == *event))
return 0;
- /* If a driver is bound, then notify the driver. */
- if (test_bit(WMI_PROBED, &wblock->flags) && wblock->dev.dev.driver) {
- struct wmi_driver *driver = drv_to_wdrv(wblock->dev.dev.driver);
- struct acpi_buffer evdata = { ACPI_ALLOCATE_BUFFER, NULL };
- acpi_status status;
-
- if (!driver->no_notify_data) {
- status = get_event_data(wblock, &evdata);
- if (ACPI_FAILURE(status)) {
- dev_warn(&wblock->dev.dev, "failed to get event data\n");
- return -EIO;
- }
- }
-
- if (driver->notify)
- driver->notify(&wblock->dev, evdata.pointer);
-
- kfree(evdata.pointer);
- } else if (wblock->handler) {
- /* Legacy handler */
- wblock->handler(*event, wblock->handler_data);
+ down_read(&wblock->notify_lock);
+ /* The WMI driver notify handler conflicts with the legacy WMI handler.
+ * Because of this the WMI driver notify handler takes precedence.
+ */
+ if (wblock->dev.dev.driver && wblock->driver_ready) {
+ wmi_notify_driver(wblock);
+ } else {
+ if (wblock->handler)
+ wblock->handler(*event, wblock->handler_data);
}
+ up_read(&wblock->notify_lock);
- acpi_bus_generate_netlink_event(wblock->acpi_device->pnp.device_class,
- dev_name(&wblock->dev.dev), *event, 0);
+ acpi_bus_generate_netlink_event("wmi", acpi_dev_name(wblock->acpi_device), *event, 0);
return -EBUSY;
}
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next reply other threads:[~2024-02-08 1:57 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-08 1:57 Stephen Rothwell [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-05-09 6:24 linux-next: manual merge of the drivers-x86 tree with Linus' tree Stephen Rothwell
2025-01-14 3:32 Stephen Rothwell
2025-01-14 3:42 ` Kurt Borja
2024-08-26 3:44 Stephen Rothwell
2024-03-08 2:34 Stephen Rothwell
2024-03-08 2:19 Stephen Rothwell
2024-03-01 3:14 Stephen Rothwell
2024-01-02 2:30 Stephen Rothwell
2018-10-29 3:29 Stephen Rothwell
2018-10-29 9:34 ` Andy Shevchenko
2016-01-15 1:56 Stephen Rothwell
2015-06-02 6:07 Stephen Rothwell
2015-06-03 3:27 ` Darren Hart
2015-06-03 4:04 ` Stephen Rothwell
2012-05-31 2:06 Stephen Rothwell
2011-04-08 5:26 Stephen Rothwell
2011-03-24 2:48 Stephen Rothwell
2011-03-24 2:52 ` Matthew Garrett
2010-08-25 1:22 Stephen Rothwell
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=20240208125744.300635a2@canb.auug.org.au \
--to=sfr@canb$(echo .)auug.org.au \
--cc=W_Armin@gmx$(echo .)de \
--cc=hdegoede@redhat$(echo .)com \
--cc=ilpo.jarvinen@linux$(echo .)intel.com \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-next@vger$(echo .)kernel.org \
--cc=markgross@kernel$(echo .)org \
--cc=ricardo@marliere$(echo .)net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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