Commit a8be6b6e authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman

media: flexcop-usb: use usb_endpoint_maxp()

Use the usb_endpoint_maxp() helper instead of open coding.
Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
Link: https://lore.kernel.org/r/20220822151456.27178-4-johan@kernel.orgSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent fd449bb9
......@@ -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",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment