acpi_iicbus: set device description in the probe method

Kernel prints the device announcement before the attach method is
called, so if the correct description is not set by the probe method,
then the announcement would have an incorrect one.

MFC after:	1 week
This commit is contained in:
Andriy Gapon 2020-04-24 07:55:39 +00:00
parent 7a451e61ab
commit 36b9e62831

View File

@ -573,6 +573,7 @@ acpi_iicbus_probe(device_t dev)
if (handle == NULL)
return (ENXIO);
device_set_desc(dev, "Philips I2C bus (ACPI-hinted)");
return (BUS_PROBE_DEFAULT);
}
@ -582,8 +583,6 @@ acpi_iicbus_attach(device_t dev)
struct acpi_iicbus_softc *sc = device_get_softc(dev);
int error;
device_set_desc(dev, "Philips I2C bus (ACPI-hinted)");
if (ACPI_FAILURE(acpi_iicbus_enumerate_children(dev)))
device_printf(dev, "children enumeration failed\n");