mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
ACPI: glue: Skip devices with no type in acpi_device_notify()
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> Link: https://patch.msgid.link/2078562.PYKUYFuaPT@rafael.j.wysocki
This commit is contained in:
parent
6935468526
commit
ea9102cae4
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user