summaryrefslogtreecommitdiff
path: root/drivers/staging/rtl8188eu
diff options
context:
space:
mode:
authorMartin Kaiser <martin@kaiser.cx>2021-04-06 23:48:23 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-04-07 11:24:47 +0300
commitcc23e68fdf988162736ee0db9ed519ff8b630eba (patch)
tree87099b59faefb1f6432b23718d5bfa770b9b3858 /drivers/staging/rtl8188eu
parent788fde03102781745190153642b7ba6e7aeb3649 (diff)
downloadlinux-cc23e68fdf988162736ee0db9ed519ff8b630eba.tar.xz
staging: rtl8188eu: clean up usb_read8
Remove unnecessary variable, summarize declaration and assignment. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210406204829.18130-5-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.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c b/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c
index 205a15dd67a5..0172405c815e 100644
--- a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c
+++ b/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c
@@ -296,14 +296,10 @@ exit:
u8 usb_read8(struct adapter *adapter, u32 addr)
{
- u16 wvalue;
- u16 len;
- u8 data = 0;
-
- wvalue = (u16)(addr & 0x0000ffff);
- len = 1;
+ u16 wvalue = (u16)(addr & 0xffff);
+ u8 data;
- usbctrl_vendorreq(adapter, wvalue, &data, len, REALTEK_USB_VENQT_READ);
+ usbctrl_vendorreq(adapter, wvalue, &data, 1, REALTEK_USB_VENQT_READ);
return data;
}