aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/media
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2022-08-22 17:14:56 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-09-26 10:59:25 +0200
commita8be6b6ee9595d425f304770811f3513a503e61c (patch)
treefecc6415d0d632ae3a26637c77b6eeab9d12de61 /drivers/media
parentmedia: flexcop-usb: clean up URB initialisation (diff)
downloadwireguard-linux-a8be6b6ee9595d425f304770811f3513a503e61c.tar.xz
wireguard-linux-a8be6b6ee9595d425f304770811f3513a503e61c.zip
media: flexcop-usb: use usb_endpoint_maxp()
Use the usb_endpoint_maxp() helper instead of open coding. Signed-off-by: Johan Hovold <johan@kernel.org> Link: https://lore.kernel.org/r/20220822151456.27178-4-johan@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/usb/b2c2/flexcop-usb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/usb/b2c2/flexcop-usb.c b/drivers/media/usb/b2c2/flexcop-usb.c
index 7102b346db05..790787f0eba8 100644
--- a/drivers/media/usb/b2c2/flexcop-usb.c
+++ b/drivers/media/usb/b2c2/flexcop-usb.c
@@ -430,7 +430,7 @@ static int flexcop_usb_transfer_init(struct flexcop_usb *fc_usb)
int bufsize, i, j, ret;
int buffer_offset = 0;
- frame_size = le16_to_cpu(alt->endpoint[0].desc.wMaxPacketSize);
+ frame_size = usb_endpoint_maxp(&alt->endpoint[0].desc);
bufsize = B2C2_USB_NUM_ISO_URB * B2C2_USB_FRAMES_PER_ISO * frame_size;
deb_ts("creating %d iso-urbs with %d frames each of %d bytes size = %d.\n",