Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Apr 2026 20:28:11 +0000
From:      Olivier Certner <olce@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: bd05b47fbd8b - main - acpi_spmc(4): Small probe improvements/fixes
Message-ID:  <69e297db.20712.efdbc17@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by olce:

URL: https://cgit.FreeBSD.org/src/commit/?id=bd05b47fbd8b7301983dc4ceaf0498fb8d5ca9f2

commit bd05b47fbd8b7301983dc4ceaf0498fb8d5ca9f2
Author:     Olivier Certner <olce@FreeBSD.org>
AuthorDate: 2026-04-10 14:15:09 +0000
Commit:     Olivier Certner <olce@FreeBSD.org>
CommitDate: 2026-04-17 20:27:51 +0000

    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
---
 sys/dev/acpica/acpi_spmc.c | 9 +++++----
 1 file 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);
 }
 


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69e297db.20712.efdbc17>