]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
staging: rtl8723bs: remove overwriting of current IMR settings
authorNikolay Kulikov <nikolayof23@gmail.com>
Tue, 12 May 2026 12:55:33 +0000 (15:55 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 21 May 2026 09:21:14 +0000 (11:21 +0200)
Originally, this code use to
Step 1: Read a value from register
Step 2: Add some bits to the value
Step 3: Write the result back to the same register

The problem was that the bits in Step 2 were always zero and didn't
change the value, so I have removed that code. Now this function
just reads a value and writes the same value back. It is unnecessary
and can be removed.

Signed-off-by: Nikolay Kulikov <nikolayof23@gmail.com>
Link: https://patch.msgid.link/20260512125703.6878-4-nikolayof23@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/hal/sdio_ops.c

index f7f6e273c8680bd35ca9f4e9b554be10e3d5fa54..91580f6ba52e535170e0f70e57d7e72786bbf991 100644 (file)
@@ -592,17 +592,12 @@ void rtw_sdio_enable_interrupt(struct adapter *adapter)
 {
        struct hal_com_data *haldata;
        __le32 himr;
-       u32 tmp;
 
        haldata = GET_HAL_DATA(adapter);
 
        himr = cpu_to_le32(haldata->sdio_himr);
        sdio_local_write(adapter, SDIO_REG_HIMR, 4, (u8 *)&himr);
 
-       /*  Update current system IMR settings */
-       tmp = rtw_read32(adapter, REG_HSIMR);
-       rtw_write32(adapter, REG_HSIMR, tmp);
-
        /*  */
        /*  <Roger_Notes> There are some C2H CMDs have been sent before system interrupt is enabled, e.g., C2H, CPWM. */
        /*  So we need to clear all C2H events that FW has notified, otherwise FW won't schedule any commands anymore. */