staging: rtl8188eu: clean up usb_write32

Remove unnecessary variable, summarize declaration and assignment.

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

View File

@ -503,15 +503,10 @@ int usb_write16(struct adapter *adapter, u32 addr, u16 val)
int usb_write32(struct adapter *adapter, u32 addr, u32 val)
{
u16 wvalue;
u16 len;
__le32 data;
u16 wvalue = (u16)(addr & 0xffff);
__le32 data = cpu_to_le32(val);
wvalue = (u16)(addr & 0x0000ffff);
len = 4;
data = cpu_to_le32(val);
return usbctrl_vendorreq(adapter, wvalue, &data, len, REALTEK_USB_VENQT_WRITE);
return usbctrl_vendorreq(adapter, wvalue, &data, 4, REALTEK_USB_VENQT_WRITE);
}
static void usb_write_port_complete(struct urb *purb, struct pt_regs *regs)