[PATCH 6/6] wifi: wilc1000: Use device-specific logging
From: Mihai Sain
Date: Mon Nov 23 2026 - 08:42:29 EST
Replace pr_err(), pr_warn() and pr_debug() with their
device-specific counterparts dev_err(), dev_warn() and
dev_dbg().
This ensures that log messages are associated with the
corresponding device, making debugging easier, especially
when multiple devices are present.
Signed-off-by: Mihai Sain <mihai.sain@xxxxxxxxxxxxx>
---
.../net/wireless/microchip/wilc1000/wlan.c | 20 ++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/drivers/net/wireless/microchip/wilc1000/wlan.c b/drivers/net/wireless/microchip/wilc1000/wlan.c
index 55a77a2e3288..2aece4ec1a33 100644
--- a/drivers/net/wireless/microchip/wilc1000/wlan.c
+++ b/drivers/net/wireless/microchip/wilc1000/wlan.c
@@ -575,7 +575,7 @@ static int chip_allow_sleep_wilc1000(struct wilc *wilc)
break;
}
if (!trials)
- pr_warn("FW not responding\n");
+ dev_warn(wilc->dev, "FW not responding\n");
/* Clear bit 1 */
ret = hif_func->hif_read_reg(wilc, wakeup_reg, ®);
@@ -676,7 +676,8 @@ static int chip_wakeup_wilc1000(struct wilc *wilc)
ret = hif_func->hif_read_reg(wilc, clk_status_reg,
&clk_status_val);
if (ret) {
- pr_err("Bus error %d %x\n", ret, clk_status_val);
+ dev_err(wilc->dev, "Bus error %d %x\n", ret,
+ clk_status_val);
return ret;
}
if (clk_status_val & clk_status_bit)
@@ -685,7 +686,7 @@ static int chip_wakeup_wilc1000(struct wilc *wilc)
trials++;
}
if (trials >= WAKE_UP_TRIAL_RETRY) {
- pr_err("Failed to wake-up the chip\n");
+ dev_err(wilc->dev, "Failed to wake-up the chip\n");
return -ETIMEDOUT;
}
/* Sometimes spi fail to read clock regs after reading
@@ -1270,7 +1271,8 @@ int wilc_wlan_firmware_download(struct wilc *wilc, const u8 *buffer,
return -EIO;
offset = 0;
- pr_debug("%s: Downloading firmware size = %d\n", __func__, buffer_size);
+ dev_dbg(wilc->dev, "%s: Downloading firmware size = %d\n", __func__,
+ buffer_size);
ret = acquire_bus(wilc, WILC_BUS_ACQUIRE_AND_WAKEUP);
if (ret)
@@ -1281,7 +1283,7 @@ int wilc_wlan_firmware_download(struct wilc *wilc, const u8 *buffer,
ret = wilc->hif_func->hif_write_reg(wilc, WILC_GLB_RESET_0, reg);
wilc->hif_func->hif_read_reg(wilc, WILC_GLB_RESET_0, ®);
if (reg & BIT(10))
- pr_err("%s: Failed to reset\n", __func__);
+ dev_err(wilc->dev, "%s: Failed to reset\n", __func__);
ret = release_bus(wilc, WILC_BUS_RELEASE_ONLY);
if (ret)
@@ -1313,10 +1315,10 @@ int wilc_wlan_firmware_download(struct wilc *wilc, const u8 *buffer,
ret = rv;
if (ret) {
- pr_err("%s Bus error\n", __func__);
+ dev_err(wilc->dev, "%s Bus error\n", __func__);
goto fail;
}
- pr_debug("%s Offset = %d\n", __func__, offset);
+ dev_dbg(wilc->dev, "%s Offset = %d\n", __func__, offset);
} while (offset < buffer_size);
fail:
@@ -1711,14 +1713,14 @@ int wilc_load_mac_from_nv(struct wilc *wl)
WILC_NVMEM_BANK_BASE + bank_offset,
®1);
if (ret) {
- pr_err("Can not read address %d lower part", i);
+ dev_err(wl->dev, "Can not read address %d lower part", i);
break;
}
ret = wl->hif_func->hif_read_reg(wl,
WILC_NVMEM_BANK_BASE + bank_offset + 4,
®2);
if (ret) {
- pr_err("Can not read address %d upper part", i);
+ dev_err(wl->dev, "Can not read address %d upper part", i);
break;
}
--
2.56.1