diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-04-17 09:07:37 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-04-17 09:07:37 +0200 |
commit | 15a0654851382faaf41a8da6d4e10201091246b9 (patch) | |
tree | 810678e1b3d71b5b6e3c2422c6dddc6d3065caed /drivers/acpi/scan.c | |
parent | 7f1534e172f5eb9c215a25d73ee9ef57eb1582ba (diff) | |
parent | 4f7d029b9bf009fbee76bb10c0c4351a1870d2f3 (diff) |
Merge 4.11-rc7 into tty-next
We want the tty patch revert in here to handle merges and future work
properly.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/acpi/scan.c')
-rw-r--r-- | drivers/acpi/scan.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 192691880d55..2433569b02ef 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c @@ -1857,15 +1857,20 @@ static void acpi_bus_attach(struct acpi_device *device) return; device->flags.match_driver = true; - if (!ret) { - ret = device_attach(&device->dev); - if (ret < 0) - return; - - if (!ret && device->pnp.type.platform_id) - acpi_default_enumeration(device); + if (ret > 0) { + acpi_device_set_enumerated(device); + goto ok; } + ret = device_attach(&device->dev); + if (ret < 0) + return; + + if (ret > 0 || !device->pnp.type.platform_id) + acpi_device_set_enumerated(device); + else + acpi_default_enumeration(device); + ok: list_for_each_entry(child, &device->children, node) acpi_bus_attach(child); |