diff options
| author | Olivier Certner <olce@FreeBSD.org> | 2026-04-10 14:15:09 +0000 |
|---|---|---|
| committer | Olivier Certner <olce@FreeBSD.org> | 2026-04-17 20:27:51 +0000 |
| commit | bd05b47fbd8b7301983dc4ceaf0498fb8d5ca9f2 (patch) | |
| tree | 1bd4c41f68734a337b04621878ab689eca404995 | |
| parent | 2ac5b9bd0b132ac0fb69800724dbfcab45ccc35c (diff) | |
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
| -rw-r--r-- | sys/dev/acpica/acpi_spmc.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/dev/acpica/acpi_spmc.c b/sys/dev/acpica/acpi_spmc.c index ca7b3bd95ead..5be2ba439de4 100644 --- a/sys/dev/acpica/acpi_spmc.c +++ b/sys/dev/acpica/acpi_spmc.c @@ -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); } |
