Re: [PATCH 03/10] at91_udc: use helper functions to determine endpoint type and direction

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wednesday 15 April 2009, Matthias Kaehlcke wrote:
> Use helper functions to determine the type and direction of an endpoint
> instead of fiddling with bEndpointAddress and bmAttributes
> 
> Signed-off-by: Matthias Kaehlcke <matthias@xxxxxxxxxxxx>

Acked-by: David Brownell <dbrownell@xxxxxxxxxxxxxxxxxxxxx>


> ---
>  drivers/usb/gadget/at91_udc.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c
> index 0b2bb8f..e954225 100644
> --- a/drivers/usb/gadget/at91_udc.c
> +++ b/drivers/usb/gadget/at91_udc.c
> @@ -485,7 +485,7 @@ static int at91_ep_enable(struct usb_ep *_ep,
>  		return -ESHUTDOWN;
>  	}
>  
> -	tmp = desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK;
> +	tmp = usb_endpoint_type(desc);
>  	switch (tmp) {
>  	case USB_ENDPOINT_XFER_CONTROL:
>  		DBG("only one control endpoint\n");
> @@ -517,7 +517,7 @@ ok:
>  	local_irq_save(flags);
>  
>  	/* initialize endpoint to match this descriptor */
> -	ep->is_in = (desc->bEndpointAddress & USB_DIR_IN) != 0;
> +	ep->is_in = usb_endpoint_dir_in(desc);
>  	ep->is_iso = (tmp == USB_ENDPOINT_XFER_ISOC);
>  	ep->stopped = 0;
>  	if (ep->is_in)
> -- 
> 1.6.2.1
> 
> 



--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux