wilc1000: write value to WILC_INTR2_ENABLE register
authorMarcus Folkesson <marcus.folkesson@gmail.com>
Wed, 24 Feb 2021 16:37:06 +0000 (17:37 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 May 2021 07:50:29 +0000 (09:50 +0200)
[ Upstream commit e21b6e5a54628cd3935f200049d4430c25c54e03 ]

Write the value instead of reading it twice.

Fixes: c5c77ba18ea6 ("staging: wilc1000: Add SDIO/SPI 802.11 driver")
Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20210224163706.519658-1-marcus.folkesson@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/microchip/wilc1000/sdio.c

index 351ff90..e14b9fc 100644 (file)
@@ -947,7 +947,7 @@ static int wilc_sdio_sync_ext(struct wilc *wilc, int nint)
                        for (i = 0; (i < 3) && (nint > 0); i++, nint--)
                                reg |= BIT(i);
 
-                       ret = wilc_sdio_read_reg(wilc, WILC_INTR2_ENABLE, &reg);
+                       ret = wilc_sdio_write_reg(wilc, WILC_INTR2_ENABLE, reg);
                        if (ret) {
                                dev_err(&func->dev,
                                        "Failed write reg (%08x)...\n",