Date: Sun, 16 Jun 2024 20:37:52 GMT From: Mark Johnston <markj@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 48f5a429c955 - main - iicbus: Use device_set_descf() Message-ID: <202406162037.45GKbqVl079332@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=48f5a429c95513465327f722a8df52cb48eeb473 commit 48f5a429c95513465327f722a8df52cb48eeb473 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2024-06-05 14:19:06 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2024-06-16 20:37:26 +0000 iicbus: Use device_set_descf() No functional change intended. MFC after: 1 week --- sys/dev/iicbus/iichid.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sys/dev/iicbus/iichid.c b/sys/dev/iicbus/iichid.c index ff443afbf30a..222f20842a04 100644 --- a/sys/dev/iicbus/iichid.c +++ b/sys/dev/iicbus/iichid.c @@ -1037,7 +1037,6 @@ iichid_probe(device_t dev) { struct iichid_softc *sc; ACPI_HANDLE handle; - char buf[80]; uint16_t config_reg; int error, reg; @@ -1097,10 +1096,8 @@ iichid_probe(device_t dev) sc->probe_result = BUS_PROBE_DEFAULT; done: - if (sc->probe_result <= BUS_PROBE_SPECIFIC) { - snprintf(buf, sizeof(buf), "%s I2C HID device", sc->hw.name); - device_set_desc_copy(dev, buf); - } + if (sc->probe_result <= BUS_PROBE_SPECIFIC) + device_set_descf(dev, "%s I2C HID device", sc->hw.name); return (sc->probe_result); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202406162037.45GKbqVl079332>