staging: rtl8188eu: clean up usb_write16
Remove unnecessary variable, summarize declaration and assignment. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210406204829.18130-9-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
4f178eeb0d
commit
cecaae74ea
@ -495,16 +495,10 @@ int usb_write8(struct adapter *adapter, u32 addr, u8 val)
|
|||||||
|
|
||||||
int usb_write16(struct adapter *adapter, u32 addr, u16 val)
|
int usb_write16(struct adapter *adapter, u32 addr, u16 val)
|
||||||
{
|
{
|
||||||
u16 wvalue;
|
u16 wvalue = (u16)(addr & 0xffff);
|
||||||
u16 len;
|
__le32 data = cpu_to_le32(val & 0xffff);
|
||||||
__le32 data;
|
|
||||||
|
|
||||||
wvalue = (u16)(addr & 0x0000ffff);
|
return usbctrl_vendorreq(adapter, wvalue, &data, 2, REALTEK_USB_VENQT_WRITE);
|
||||||
len = 2;
|
|
||||||
|
|
||||||
data = cpu_to_le32(val & 0x0000ffff);
|
|
||||||
|
|
||||||
return usbctrl_vendorreq(adapter, wvalue, &data, len, REALTEK_USB_VENQT_WRITE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int usb_write32(struct adapter *adapter, u32 addr, u32 val)
|
int usb_write32(struct adapter *adapter, u32 addr, u32 val)
|
||||||
|
Loading…
Reference in New Issue
Block a user