mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Linux ACPI <linux-acpi@vger.kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: [PATCH v1 4/4] ACPI: glue: Skip devices with no type in acpi_device_notify()
Date: Thu, 10 Sep 2026 19:56:22 +0200	[thread overview]
Message-ID: <2078562.PYKUYFuaPT@rafael.j.wysocki> (raw)
In-Reply-To: <12995802.O9o76ZdvQC@rafael.j.wysocki>

From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>

Since all of the users of struct acpi_bus_type use the device type
for matching, devices without a type will not be matched by any of
them, so they can be skipped early in acpi_device_notify().

Update the code accordingly.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
 drivers/acpi/glue.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/acpi/glue.c b/drivers/acpi/glue.c
index 1981ebfb5ce0..c53f3d86254a 100644
--- a/drivers/acpi/glue.c
+++ b/drivers/acpi/glue.c
@@ -63,6 +63,9 @@ static struct acpi_device *acpi_companion_lookup(struct device *dev)
 {
 	struct acpi_bus_type *type;
 
+	if (!dev->type)
+		return NULL;
+
 	guard(rwsem_read)(&bus_type_sem);
 
 	list_for_each_entry(type, &bus_type_list, list) {
-- 
2.51.0





      parent reply	other threads:[~2026-09-10 17:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-10 17:51 [PATCH v1 0/4] ACPI: glue: Three fixes and optimization Rafael J. Wysocki
2026-09-10 17:56 ` [PATCH v1 1/4] ACPI: glue: Carry out companion lookup under bus_type_sem Rafael J. Wysocki
2026-09-10 17:56 ` [PATCH v1 2/4] ACPI: glue: Rearrange acpi_bind_one() to avoid breakage Rafael J. Wysocki
2026-09-11  7:40   ` Andy Shevchenko
2026-09-11 10:24     ` Rafael J. Wysocki (Intel)
2026-09-11 16:01       ` Andy Shevchenko
2026-09-10 17:56 ` [PATCH v1 3/4] ACPI: glue: Fix up and adjust acpi_unbind_one() Rafael J. Wysocki
2026-09-10 17:56 ` Rafael J. Wysocki [this message]

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=2078562.PYKUYFuaPT@rafael.j.wysocki \
    --to=rafael@kernel.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®