]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
staging: rtl8188eu: use actual request type as parameter
authorMartin Kaiser <martin@kaiser.cx>
Tue, 6 Apr 2021 20:48:22 +0000 (22:48 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 7 Apr 2021 08:24:47 +0000 (10:24 +0200)
commit788fde03102781745190153642b7ba6e7aeb3649
treec0d60a04250717c419bf0de3c9663ed231a07c63
parent3d0be94f62fdee2278fec653bf6b952136a51516
staging: rtl8188eu: use actual request type as parameter

At the moment, usbctrl_vendorreq's requesttype parameter must be set to 1
for reading and 0 for writing. It's then converted to the actual
bmRequestType for the USB control request. We can simplify the code and
avoid this conversion if the caller passes the actual bmRequestType.

We already have defines for the read and write request types. Move them to
usb_ops_linux.c, they're used only inside this file. Replace the numeric
values with USB constants to make their meaning clearer.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210406204829.18130-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/include/usb_ops_linux.h
drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c