From mboxrd@z Thu Jan 1 00:00:00 1970 From: richard.zhao@freescale.com (Richard Zhao) Date: Wed, 16 May 2012 13:46:50 +0800 Subject: [PATCH v1 2/7] usb: chipidea: remove zero check of hw_ep_max In-Reply-To: <20120516053248.GA22251@nchen-desktop> References: <1337090303-16046-1-git-send-email-richard.zhao@freescale.com> <1337090303-16046-3-git-send-email-richard.zhao@freescale.com> <20120516053248.GA22251@nchen-desktop> Message-ID: <20120516054649.GC19137@b20223-02.ap.freescale.net> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Wed, May 16, 2012 at 01:32:50PM +0800, Peter Chen wrote: > On Tue, May 15, 2012 at 09:58:18PM +0800, Richard Zhao wrote: > > It's 0 for host only device. > > > > Signed-off-by: Richard Zhao > > --- > > 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) > > return -ENODEV; > Can you move this get hw_ep_max code to udc.c? As hw_ep_max is only used > for device driver. What do you think, Alex? Yes, But since Greg has applied the patch, one may need to rebase or let it be as it is. Thanks Richard > > > > dev_dbg(ci->dev, "ChipIdea HDRC found, lpm: %d; cap: %p op: %p\n", > > -- > > 1.7.5.4 > > > > -- > > Best Regards, > Peter Chen