On Sat, 23 Dec 2006 23:14:58 -0800 Sarah Bailey wrote:
> Added a function to check if an endpoint is a control endpoint.
> There were similar functions for bulk, interrupt, and isoc,
> but not for control endpoints.
Do you have code that uses this? If so, where is it?
We don't generally add infrastructure that is unused.
> Signed-off-by: Sarah Bailey <[EMAIL PROTECTED]>
> ---
> include/linux/usb.h | 12 ++++++++++++
> 1 files changed, 12 insertions(+), 0 deletions(-)
>
> diff --git a/include/linux/usb.h b/include/linux/usb.h
> index aab5b1b..755e382 100644
> --- a/include/linux/usb.h
> +++ b/include/linux/usb.h
> @@ -554,6 +554,18 @@ static inline int usb_endpoint_xfer_bulk(const struct
> usb_endpoint_descriptor *e
> }
>
> /**
> + * usb_endpoint_xfer_control - check if the endpoint has control transfer
> type
> + * @epd: endpoint to be checked
> + *
> + * Returns true if the endpoint is of type control, otherwise it returns
> false.
> + */
> +static inline int usb_endpoint_xfer_control(const struct
> usb_endpoint_descriptor *epd)
> +{
> + return ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) ==
> + USB_ENDPOINT_XFER_CONTROL);
Don't use the outer set of parens. Linux style is just:
return value;
not
return (value);
> +}
> +
> +/**
> * usb_endpoint_xfer_int - check if the endpoint has interrupt transfer type
> * @epd: endpoint to be checked
> *
---
~Randy
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel