Re: [RFC/PATCH 18/45] usb: gadget: udc: bdc: make use of new usb_endpoint_maxp_mult()

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

 



On Wed, Sep 28, 2016 at 04:05:27PM +0300, Felipe Balbi wrote:
> We have introduced a helper to calculate multiplier
> value from wMaxPacketSize. Start using it.
> 
> Cc: Ashwini Pahuja <ashwini.linux@xxxxxxxxx>
> Cc: <linux-usb@xxxxxxxxxxxxxxx>
> Signed-off-by: Felipe Balbi <felipe.balbi@xxxxxxxxxxxxxxx>
> ---
>  drivers/usb/gadget/udc/bdc/bdc_cmd.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/gadget/udc/bdc/bdc_cmd.c b/drivers/usb/gadget/udc/bdc/bdc_cmd.c
> index 4d5e9188beae..6e920f1dce02 100644
> --- a/drivers/usb/gadget/udc/bdc/bdc_cmd.c
> +++ b/drivers/usb/gadget/udc/bdc/bdc_cmd.c
> @@ -182,7 +182,7 @@ int bdc_config_ep(struct bdc *bdc, struct bdc_ep *ep)
>  					usb_endpoint_xfer_int(desc)) {
>  			param2 |= si;
>  
> -			mbs = (usb_endpoint_maxp(desc) & 0x1800) >> 11;
> +			mbs = usb_endpoint_maxp_mult(desc);

In the original code mbs is 0 based. Now the new code makes it 1 based.

Regards,
-Bin.

>  			param2 |= mbs << MB_SHIFT;
>  		}
>  		break;
> -- 
> 2.10.0.440.g21f862b
> 
> --
> 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
--
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