[PATCH 9/9] watchdog: w83627hf_wdt: Use dev_* logging instead of pr_*
Paul Louvel <[email protected]> Sat, 25 Jul 2026 12:29:36 +0200
| Newsgroups | org.kernel.vger.linux-watchdog,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
The pr_* logging functions do not identify which device generated a message. Use dev_* logging functions instead. Since the device name is printed with this family of function, remove the duplicate name in the initialization message. Signed-off-by: Paul Louvel <[email protected]> --- drivers/watchdog/w83627hf_wdt.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/watchdog/w83627hf_wdt.c b/drivers/watchdog/w83627hf_wdt.c index cf1a3fb3a6fd..83c5d8b52b13 100644 --- a/drivers/watchdog/w83627hf_wdt.c +++ b/drivers/watchdog/w83627hf_wdt.c @@ -471,12 +471,13 @@ static int wdt_probe(struct platform_device *pdev) const struct platform_device_id *id = platform_get_device_id(pdev); const struct wdt_pdata *pdata = pdev->dev.platform_data; enum chips chip = id->driver_data; + struct device *dev = &pdev->dev; struct watchdog_device *wdd; struct w83627hf_data *data; struct resource *res; int ret; - pr_info("WDT driver for %s Super I/O chip initialising\n", id->name); + dev_info(dev, "WDT driver initialising\n"); res = platform_get_resource(pdev, IORESOURCE_IO, 0); if (!res) { @@ -533,11 +534,11 @@ static int wdt_probe(struct platform_device *pdev) if (data->early_timer_val) { if (early_disable) { - pr_warn("Stopping previously enabled watchdog until userland kicks in\n"); + dev_warn(dev, "Stopping previously enabled watchdog until userland kicks in\n"); ret = wdt_stop(wdd); } else { - pr_info("Watchdog already running. Resetting timeout to %d sec\n", - wdd->timeout); + dev_info(dev, "Watchdog already running. Resetting timeout to %d sec\n", + wdd->timeout); ret = wdt_start(wdd); set_bit(WDOG_HW_RUNNING, &wdd->status); } @@ -550,13 +551,12 @@ static int wdt_probe(struct platform_device *pdev) if (ret) goto fail; - pr_info("initialized. timeout=%d sec (nowayout=%d)\n", wdd->timeout, - nowayout); + dev_info(dev, "initialized. timeout=%d sec (nowayout=%d)\n", + wdd->timeout, nowayout); return 0; fail: - pr_err("failed to initialize watchdog (err=%d)\n", ret); - return ret; + return dev_err_probe(dev, ret, "failed to initialize watchdog\n"); } /* -- 2.55.0