git: b86ba6cdf113 - stable/14 - iicbus: Use device_set_descf()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 27 Jun 2024 15:31:00 UTC
The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b86ba6cdf11385330f7d84022bc477ead676ee2a commit b86ba6cdf11385330f7d84022bc477ead676ee2a Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2024-06-05 14:19:06 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2024-06-27 15:27:41 +0000 iicbus: Use device_set_descf() No functional change intended. MFC after: 1 week (cherry picked from commit 48f5a429c95513465327f722a8df52cb48eeb473) --- 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); }