staging: rtl8188eu: clean up usb_write8

Remove unnecessary variable, summarize declaration and assignment.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210406204829.18130-8-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Martin Kaiser 2021-04-06 22:48:26 +02:00 committed by Greg Kroah-Hartman
parent e8f44d356e
commit 4f178eeb0d

View File

@ -487,14 +487,10 @@ void rtw_hal_inirp_deinit(struct adapter *padapter)
int usb_write8(struct adapter *adapter, u32 addr, u8 val)
{
u16 wvalue;
u16 len;
u8 data;
u16 wvalue = (u16)(addr & 0xffff);
u8 data = val;
wvalue = (u16)(addr & 0x0000ffff);
len = 1;
data = val;
return usbctrl_vendorreq(adapter, wvalue, &data, len, REALTEK_USB_VENQT_WRITE);
return usbctrl_vendorreq(adapter, wvalue, &data, 1, REALTEK_USB_VENQT_WRITE);
}
int usb_write16(struct adapter *adapter, u32 addr, u16 val)