acpi_spmc(4): Small probe improvements/fixes
Remove the test on presence of an ACPI handle, this is implied by ACPI_ID_PROBE() succeeding. Set 'sc->dev' early, so that acpi_spmc_check_dsm_set() using device_printf() will print the driver name. Add a missing newline after printing that more DSM functions are implemented then expected. Reviewed by: obiwac Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56483
This commit is contained in:
@@ -200,12 +200,13 @@ acpi_spmc_probe(device_t dev)
|
||||
}
|
||||
|
||||
handle = acpi_get_handle(dev);
|
||||
if (handle == NULL)
|
||||
return (ENXIO);
|
||||
/* ACPI_ID_PROBE() above cannot succeed without a handle. */
|
||||
MPASS(handle != NULL);
|
||||
|
||||
sc = device_get_softc(dev);
|
||||
sc->dev = dev;
|
||||
|
||||
/* Check which sets of DSM's are supported. */
|
||||
/* Check which sets of DSMs are supported. */
|
||||
sc->dsm_sets = 0;
|
||||
|
||||
acpi_spmc_check_dsm_set(sc, handle, &intel_dsm_set);
|
||||
@@ -286,7 +287,7 @@ acpi_spmc_check_dsm_set(struct acpi_spmc_softc *sc, ACPI_HANDLE handle,
|
||||
|
||||
if ((dsms_supported & ~max_dsms) != 0)
|
||||
device_printf(sc->dev, "DSM set %s supports more DSMs than "
|
||||
"expected (%#" PRIx64 " vs %#" PRIx64 ").", dsm_set->name,
|
||||
"expected (%#" PRIx64 " vs %#" PRIx64 ").\n", dsm_set->name,
|
||||
dsms_supported, max_dsms);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user