ACPI / scan: Avoid enumerating devices more than once
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sun, 16 Apr 2017 23:20:48 +0000 (01:20 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 19 Apr 2017 20:57:04 +0000 (22:57 +0200)
commitc381fc3a1bbfc9d780048a0b94afd162e4c3815b
treef4499d7a1cf594caed95fc43dea3b5d634e5788b
parentf5beabfe61794d9a9d9549d387cda2bffd81e504
ACPI / scan: Avoid enumerating devices more than once

acpi_bus_attach() does not check the visited flag for devices that
have been enumerated already and some of them may be enumerated
for multiple times as a result, because some callers of
acpi_bus_scan() don't check the visited flag either.

For this reason, modify acpi_bus_attach() to check the visited flag
and avoid enumerating devices that have already been enumerated.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Joey Lee <jlee@suse.com>
drivers/acpi/scan.c