Re: [PATCH v1 2/7] usb: chipidea: remove zero check of hw_ep_max

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


Dear Richard Zhao,

> It's 0 for host only device.
> 
> Signed-off-by: Richard Zhao <richard.zhao@xxxxxxxxxxxxx>
> ---
>  drivers/usb/chipidea/core.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c
> index f568b8e..15e03b3 100644
> --- a/drivers/usb/chipidea/core.c
> +++ b/drivers/usb/chipidea/core.c
> @@ -195,7 +195,7 @@ static int hw_device_init(struct ci13xxx *ci, void
> __iomem *base) ffs_nr(DCCPARAMS_DEN);
>  	ci->hw_ep_max = reg * 2;   /* cache hw ENDPT_MAX */
> 
> -	if (ci->hw_ep_max == 0 || ci->hw_ep_max > ENDPT_MAX)
> +	if (ci->hw_ep_max > ENDPT_MAX)

Well, maybe this check should be extended a bit? Let me send a subsequent patch 
in reply to this, see what you think about it?

>  		return -ENODEV;
> 
>  	dev_dbg(ci->dev, "ChipIdea HDRC found, lpm: %d; cap: %p op: %p\n",

Best regards,
Marek Vasut
--
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


B and H Foto and Electronics Corp.

[Linux Media]     [Video for Linux]     [Linux Input]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Free Online Dating]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]     [More Archives]

Add to Google Powered by Linux