Re: [PATCH v2 05/12] usb: chipidea: udc: rework ep_enable cap setting

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

 



Hi,

On Tue, Mar 26, 2013 at 05:58:41PM +0100, Michael Grzeschik wrote:
> This patch reworks the cap value from several read
> and write operations to one single operation.
> 
> Signed-off-by: Michael Grzeschik <m.grzeschik@xxxxxxxxxxxxxx>
> ---
> Changes since v1:
>  - rebased on the new alignment patch
> 
>  drivers/usb/chipidea/udc.c | 17 ++++++++---------
>  1 file changed, 8 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c
> index 53c6c7f..567ce89 100644
> --- a/drivers/usb/chipidea/udc.c
> +++ b/drivers/usb/chipidea/udc.c
> @@ -1008,6 +1008,7 @@ static int ep_enable(struct usb_ep *ep,
>  	struct ci13xxx_ep *mEp = container_of(ep, struct ci13xxx_ep, ep);
>  	int retval = 0;
>  	unsigned long flags;
> +	u32 val = 0;
>  
>  	if (ep == NULL || desc == NULL)
>  		return -EINVAL;
> @@ -1029,19 +1030,17 @@ static int ep_enable(struct usb_ep *ep,
>  
>  	trace_ci_ep_enable(mEp, 0);
>  
> -	mEp->qh.ptr->cap = 0;
> -
>  	if (mEp->type == USB_ENDPOINT_XFER_CONTROL)
> -		mEp->qh.ptr->cap |=  QH_IOS;
> +		val |= QH_IOS;
>  	else if (mEp->type == USB_ENDPOINT_XFER_ISOC)
> -		mEp->qh.ptr->cap &= ~QH_MULT;
> -	else
> -		mEp->qh.ptr->cap &= ~QH_ZLT;
> +		val &= ~QH_MULT;

probably subject to a separate patch, but a switch statement would look
nicer here.

Reviewed-by: Felipe Balbi <balbi@xxxxxx>

-- 
balbi

Attachment: signature.asc
Description: Digital signature


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

  Powered by Linux