mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-14 04:09:18 -04:00
staging: rtl8188eu: clean up usb_read16
Remove unnecessary variable, summarize declaration and assignment. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210406204829.18130-6-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
cc23e68fdf
commit
0009261516
@@ -306,13 +306,10 @@ u8 usb_read8(struct adapter *adapter, u32 addr)
|
||||
|
||||
u16 usb_read16(struct adapter *adapter, u32 addr)
|
||||
{
|
||||
u16 wvalue;
|
||||
u16 len;
|
||||
u16 wvalue = (u16)(addr & 0xffff);
|
||||
__le32 data;
|
||||
|
||||
wvalue = (u16)(addr & 0x0000ffff);
|
||||
len = 2;
|
||||
usbctrl_vendorreq(adapter, wvalue, &data, len, REALTEK_USB_VENQT_READ);
|
||||
usbctrl_vendorreq(adapter, wvalue, &data, 2, REALTEK_USB_VENQT_READ);
|
||||
|
||||
return (u16)(le32_to_cpu(data) & 0xffff);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user