git: eb634b9f4f48 - main - wbwd: Use device_set_descf()

From: Mark Johnston <markj_at_FreeBSD.org>
Date: Sun, 16 Jun 2024 20:37:53 UTC
The branch main has been updated by markj:

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

commit eb634b9f4f48c29753e177f3340d03f73a75dbe5
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2024-06-05 14:19:51 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2024-06-16 20:37:26 +0000

    wbwd: Use device_set_descf()
    
    No functional change intended.
---
 sys/dev/wbwd/wbwd.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sys/dev/wbwd/wbwd.c b/sys/dev/wbwd/wbwd.c
index 56b3f8adcd90..e19a60de14a2 100644
--- a/sys/dev/wbwd/wbwd.c
+++ b/sys/dev/wbwd/wbwd.c
@@ -461,7 +461,6 @@ wb_watchdog_fn(void *private, u_int cmd, int *error)
 static int
 wb_probe(device_t dev)
 {
-	char buf[128];
 	struct wb_softc *sc;
 	int j;
 	uint8_t devid;
@@ -478,10 +477,9 @@ wb_probe(device_t dev)
 	for (j = 0; j < nitems(wb_devs); j++) {
 		if (wb_devs[j].device_id == devid) {
 			sc->chip = wb_devs[j].chip;
-			snprintf(buf, sizeof(buf),
+			device_set_descf(dev,
 			    "%s (0x%02x/0x%02x) Watchdog Timer",
 			    wb_devs[j].descr, devid, revid);
-			device_set_desc_copy(dev, buf);
 			return (BUS_PROBE_SPECIFIC);
 		}
 	}