'\" t .\" Title: usb_ep_align_maybe .\" Author: .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: July 2017 .\" Manual: Kernel Mode Gadget API .\" Source: Kernel Hackers Manual 4.11.6 .\" Language: English .\" .TH "USB_EP_ALIGN_MAYBE" "9" "July 2017" "Kernel Hackers Manual 4\&.11\&" "Kernel Mode Gadget API" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" usb_ep_align_maybe \- returns \fIlen\fR aligned to ep\*(Aqs maxpacketsize if gadget requires quirk_ep_out_aligned_size, otherwise returns len\&. .SH "SYNOPSIS" .HP \w'size_t\ usb_ep_align_maybe('u .BI "size_t usb_ep_align_maybe(struct\ usb_gadget\ *\ " "g" ", struct\ usb_ep\ *\ " "ep" ", size_t\ " "len" ");" .SH "ARGUMENTS" .PP \fIstruct usb_gadget * g\fR .RS 4 controller to check for quirk .RE .PP \fIstruct usb_ep * ep\fR .RS 4 the endpoint whose maxpacketsize is used to align \fIlen\fR .RE .PP \fIsize_t len\fR .RS 4 buffer size\*(Aqs length to align to \fIep\fR\*(Aqs maxpacketsize .RE .SH "DESCRIPTION" .PP This helper is used in case it\*(Aqs required for any reason to check and maybe align buffer\*(Aqs size to an ep\*(Aqs maxpacketsize\&. .SH "AUTHOR" .PP \fBDavid Brownell\fR <\&dbrownell@users.sourceforge.net\&> .RS 4 Author. .RE .SH "COPYRIGHT" .br