Skip to content

Commit

Permalink
ACPI / PNP: skip ACPI device nodes associated with physical nodes alr…
Browse files Browse the repository at this point in the history
…eady

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>
  • Loading branch information
Adrian Hunter authored and Rafael J. Wysocki committed Nov 23, 2012
1 parent 907ddf8 commit 2905875
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/pnp/pnpacpi/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 2905875

Please sign in to comment.