diff options
author | Adrian Hunter <adrian.hunter@intel.com> | 2012-11-23 15:07:12 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2012-11-23 15:07:12 -0500 |
commit | 2905875344f977acd188a2b0f1d163491e91459b (patch) | |
tree | 795b1d7cdaa5887d7c70e175330c08957d22c5f5 | |
parent | 907ddf89d0bb7f57e1e21485900e6564a1ab512a (diff) |
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 <adrian.hunter@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r-- | drivers/pnp/pnpacpi/core.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/pnp/pnpacpi/core.c b/drivers/pnp/pnpacpi/core.c index 26b5d4b18dd..653d5637a37 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) | |||
242 | char *pnpid; | 242 | char *pnpid; |
243 | struct acpi_hardware_id *id; | 243 | struct acpi_hardware_id *id; |
244 | 244 | ||
245 | /* Skip devices that are already bound */ | ||
246 | if (device->physical_node_count) | ||
247 | return 0; | ||
248 | |||
245 | /* | 249 | /* |
246 | * If a PnPacpi device is not present , the device | 250 | * If a PnPacpi device is not present , the device |
247 | * driver should not be loaded. | 251 | * driver should not be loaded. |