summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/microchip/wilc1000/spi.c
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2024-10-04 13:44:11 +0200
committerKalle Valo <kvalo@kernel.org>2024-10-17 19:47:41 +0300
commit719e469eb9a29a0ef624af51878c8d7217929b84 (patch)
tree3fec79defc385817964276d68b7d484352f75972 /drivers/net/wireless/microchip/wilc1000/spi.c
parent1b292a161cfb02868ffd0dc8b87a4a84b633f941 (diff)
wifi: wilc1000: Clean up usage of wilc_get_chipid()
Reduce the use of wilc_get_chipid(), use cached chip ID wherever possible. Remove duplicated partial chip ID read implementations from the driver. Update wilc_get_chipid() to always read the chip ID out of the hardware and update the cached chip ID, and make it return a proper return value instead of a chipid. Call wilc_get_chipid() early to make the cached chip ID available to various sites using is_wilc1000() to access the cached chip ID. Reviewed-by: Alexis Lothoré <alexis.lothore@bootlin.com> Signed-off-by: Marek Vasut <marex@denx.de> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://patch.msgid.link/20241004114551.40236-2-marex@denx.de
Diffstat (limited to 'drivers/net/wireless/microchip/wilc1000/spi.c')
-rw-r--r--drivers/net/wireless/microchip/wilc1000/spi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/microchip/wilc1000/spi.c b/drivers/net/wireless/microchip/wilc1000/spi.c
index 05b577b1068e..81cf82c9175e 100644
--- a/drivers/net/wireless/microchip/wilc1000/spi.c
+++ b/drivers/net/wireless/microchip/wilc1000/spi.c
@@ -245,7 +245,7 @@ static int wilc_bus_probe(struct spi_device *spi)
if (ret)
goto power_down;
- ret = wilc_validate_chipid(wilc);
+ ret = wilc_get_chipid(wilc);
if (ret)
goto power_down;