提交 29058753 编写于 作者: A Adrian Hunter 提交者: Rafael J. Wysocki

ACPI / PNP: skip ACPI device nodes associated with physical nodes already

Make pnpacpi_add_device() ignore ACPI device nodes already associated
with struct device objects representing physical devices.

In particular, this will prevent PNP device objects from being
created for ACPI device nodes already associated with platform
devices.

This change was originally proposed by Mika Westerberg.

[rjw: Modified the subject and changelog.]
Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 907ddf89
......@@ -242,6 +242,10 @@ static int __init pnpacpi_add_device(struct acpi_device *device)
char *pnpid;
struct acpi_hardware_id *id;
/* Skip devices that are already bound */
if (device->physical_node_count)
return 0;
/*
* If a PnPacpi device is not present , the device
* driver should not be loaded.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册