diff options
author | Martin Kaiser <martin@kaiser.cx> | 2021-04-06 23:48:25 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-04-07 11:24:47 +0300 |
commit | e8f44d356e6b6a83b907184852e8d4ce1384fd59 (patch) | |
tree | d3d26e024333d7c104161d477f660ff0e6fcfa34 /drivers/staging/rtl8188eu | |
parent | 00092615162f8ed8ca33cec36ddbd7804c4acbb5 (diff) | |
download | linux-e8f44d356e6b6a83b907184852e8d4ce1384fd59.tar.xz |
staging: rtl8188eu: clean up usb_read32
Remove unnecessary variable, summarize declaration and assignment.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210406204829.18130-7-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8188eu')
-rw-r--r-- | drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c b/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c index 915bf86237b0..beab5343fda8 100644 --- a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c +++ b/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c @@ -316,14 +316,10 @@ u16 usb_read16(struct adapter *adapter, u32 addr) u32 usb_read32(struct adapter *adapter, u32 addr) { - u16 wvalue; - u16 len; + u16 wvalue = (u16)(addr & 0xffff); __le32 data; - wvalue = (u16)(addr & 0x0000ffff); - len = 4; - - usbctrl_vendorreq(adapter, wvalue, &data, len, REALTEK_USB_VENQT_READ); + usbctrl_vendorreq(adapter, wvalue, &data, 4, REALTEK_USB_VENQT_READ); return le32_to_cpu(data); } |