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>
This commit is contained in:
Родитель
788fde0310
Коммит
cc23e68fdf
|
@ -296,14 +296,10 @@ exit:
|
||||||
|
|
||||||
u8 usb_read8(struct adapter *adapter, u32 addr)
|
u8 usb_read8(struct adapter *adapter, u32 addr)
|
||||||
{
|
{
|
||||||
u16 wvalue;
|
u16 wvalue = (u16)(addr & 0xffff);
|
||||||
u16 len;
|
u8 data;
|
||||||
u8 data = 0;
|
|
||||||
|
|
||||||
wvalue = (u16)(addr & 0x0000ffff);
|
usbctrl_vendorreq(adapter, wvalue, &data, 1, REALTEK_USB_VENQT_READ);
|
||||||
len = 1;
|
|
||||||
|
|
||||||
usbctrl_vendorreq(adapter, wvalue, &data, len, REALTEK_USB_VENQT_READ);
|
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче