summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/microchip
diff options
context:
space:
mode:
authorAjay Singh <ajay.kathat@microchip.com>2021-09-16 19:49:22 +0300
committerKalle Valo <kvalo@codeaurora.org>2021-09-21 18:08:17 +0300
commit301cfbab09fdc068ee4a126fc1fa3bf4b1394217 (patch)
tree7bbbe61e9c3829048704bf7874bce6aee89908da /drivers/net/wireless/microchip
parentcd50248de35b8b055c23af62980b6b11daa5ebfc (diff)
downloadlinux-301cfbab09fdc068ee4a126fc1fa3bf4b1394217.tar.xz
wilc1000: use correct write command sequence in wilc_spi_sync_ext()
Instead of using double read for the same register, use the write register command after the read command. The correct sequence is to use the read value in write command instead of reading the same register again. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20210916164902.74629-11-ajay.kathat@microchip.com
Diffstat (limited to 'drivers/net/wireless/microchip')
-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 4f0bc24d2a78..640850f989dd 100644
--- a/drivers/net/wireless/microchip/wilc1000/spi.c
+++ b/drivers/net/wireless/microchip/wilc1000/spi.c
@@ -1167,7 +1167,7 @@ static int wilc_spi_sync_ext(struct wilc *wilc, int nint)
for (i = 0; (i < 3) && (nint > 0); i++, nint--)
reg |= BIT(i);
- ret = wilc_spi_read_reg(wilc, WILC_INTR2_ENABLE, &reg);
+ ret = wilc_spi_write_reg(wilc, WILC_INTR2_ENABLE, reg);
if (ret) {
dev_err(&spi->dev, "Failed write reg (%08x)...\n",
WILC_INTR2_ENABLE);