From 2905875344f977acd188a2b0f1d163491e91459b Mon Sep 17 00:00:00 2001 From: Adrian Hunter Date: Fri, 23 Nov 2012 21:07:12 +0100 Subject: 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: Adrian Hunter Signed-off-by: Rafael J. Wysocki --- drivers/pnp/pnpacpi/core.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers/pnp') diff --git a/drivers/pnp/pnpacpi/core.c b/drivers/pnp/pnpacpi/core.c index 26b5d4b..653d563 100644 --- a/drivers/pnp/pnpacpi/core.c +++ b/drivers/pnp/pnpacpi/core.c @@ -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. -- cgit v1.1