git: ad0f458adece - stable/14 - arm: Convert drivers to use device_set_desc(f)()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 09 Jun 2024 14:12:00 UTC
The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ad0f458adece02aa026a3df6e22f8e04ec07fe95 commit ad0f458adece02aa026a3df6e22f8e04ec07fe95 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2024-02-04 23:23:00 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2024-06-09 13:37:45 +0000 arm: Convert drivers to use device_set_desc(f)() No functional change intended. MFC after: 1 week (cherry picked from commit 459dc61c8b05dedb61a2774348ffda7d7f8ea7c6) --- sys/arm/nvidia/tegra_ahci.c | 2 +- sys/arm/ti/am335x/am335x_dmtimer.c | 4 +--- sys/arm/ti/am335x/am335x_dmtpps.c | 5 +---- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/sys/arm/nvidia/tegra_ahci.c b/sys/arm/nvidia/tegra_ahci.c index 4f44a09b4a76..b2ca1f9e496b 100644 --- a/sys/arm/nvidia/tegra_ahci.c +++ b/sys/arm/nvidia/tegra_ahci.c @@ -651,7 +651,7 @@ tegra_ahci_probe(device_t dev) if (!ofw_bus_search_compatible(dev, compat_data)->ocd_data) return (ENXIO); - device_set_desc_copy(dev, "AHCI SATA controller"); + device_set_desc(dev, "AHCI SATA controller"); return (BUS_PROBE_DEFAULT); } diff --git a/sys/arm/ti/am335x/am335x_dmtimer.c b/sys/arm/ti/am335x/am335x_dmtimer.c index e576a11fe70e..341ec07466fc 100644 --- a/sys/arm/ti/am335x/am335x_dmtimer.c +++ b/sys/arm/ti/am335x/am335x_dmtimer.c @@ -249,7 +249,6 @@ am335x_dmtimer_tc_init(struct am335x_dmtimer_softc *sc) static int am335x_dmtimer_probe(device_t dev) { - char strbuf[32]; int tmr_num; uint64_t rev_address; @@ -277,8 +276,7 @@ am335x_dmtimer_probe(device_t dev) return (ENXIO); } - snprintf(strbuf, sizeof(strbuf), "AM335x DMTimer%d", tmr_num); - device_set_desc_copy(dev, strbuf); + device_set_descf("AM335x DMTimer%d", tmr_num); return(BUS_PROBE_DEFAULT); } diff --git a/sys/arm/ti/am335x/am335x_dmtpps.c b/sys/arm/ti/am335x/am335x_dmtpps.c index 23b930741c2a..3cda880431ff 100644 --- a/sys/arm/ti/am335x/am335x_dmtpps.c +++ b/sys/arm/ti/am335x/am335x_dmtpps.c @@ -383,7 +383,6 @@ static struct cdevsw dmtpps_cdevsw = { static int dmtpps_probe(device_t dev) { - char strbuf[64]; int tmr_num; uint64_t rev_address; @@ -435,9 +434,7 @@ dmtpps_probe(device_t dev) if (dmtpps_tmr_num != tmr_num) return (ENXIO); - snprintf(strbuf, sizeof(strbuf), "AM335x PPS-Capture DMTimer%d", - tmr_num); - device_set_desc_copy(dev, strbuf); + device_set_descf("AM335x PPS-Capture DMTimer%d", tmr_num); return(BUS_PROBE_DEFAULT); }