Skip to content

Commit 793551c

Browse files
committed
ACPI: scan: Fix device check notification handling
It is generally invalid to fail a Device Check notification if the scan handler has not been attached to the given device after a bus rescan, because there may be valid reasons for the scan handler to refuse attaching to the device (for example, the device is not ready). For this reason, modify acpi_scan_device_check() to return 0 in that case without printing a warning. While at it, reduce the log level of the "already enumerated" message in the same function, because it is only interesting when debugging notification handling Fixes: 443fc82 ("ACPI / hotplug: Rework generic code to handle suprise removals") Signed-off-by: Rafael J. Wysocki <[email protected]> Reviewed-by: Jonathan Cameron <[email protected]>
1 parent 1e518e8 commit 793551c

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

drivers/acpi/scan.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -314,18 +314,14 @@ static int acpi_scan_device_check(struct acpi_device *adev)
314314
* again).
315315
*/
316316
if (adev->handler) {
317-
dev_warn(&adev->dev, "Already enumerated\n");
318-
return -EALREADY;
317+
dev_dbg(&adev->dev, "Already enumerated\n");
318+
return 0;
319319
}
320320
error = acpi_bus_scan(adev->handle);
321321
if (error) {
322322
dev_warn(&adev->dev, "Namespace scan failure\n");
323323
return error;
324324
}
325-
if (!adev->handler) {
326-
dev_warn(&adev->dev, "Enumeration failure\n");
327-
error = -ENODEV;
328-
}
329325
} else {
330326
error = acpi_scan_device_not_enumerated(adev);
331327
}

0 commit comments

Comments
 (0)