wbwd: Use device_set_descf()

No functional change intended.
This commit is contained in:
Mark Johnston 2024-06-05 10:19:51 -04:00
parent 48f5a429c9
commit eb634b9f4f

View file

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