From patchwork Tue May 15 13:58:18 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Zhao X-Patchwork-Id: 8652 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id E58D023E13 for ; Tue, 15 May 2012 13:59:04 +0000 (UTC) Received: from mail-yw0-f52.google.com (mail-yw0-f52.google.com [209.85.213.52]) by fiordland.canonical.com (Postfix) with ESMTP id AE304A182AC for ; Tue, 15 May 2012 13:59:04 +0000 (UTC) Received: by yhpp61 with SMTP id p61so6766506yhp.11 for ; Tue, 15 May 2012 06:59:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf :x-spamscore:x-bigfish:x-forefront-antispam-report:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :mime-version:content-type:x-originatororg:x-gm-message-state; bh=/IlzZhx2An5NfGpx/PL44GEgOhHBTwd9uHxt9Xg1swk=; b=cd2V65lbRpcLChK6UCNuUTH/+H90rg1mXEVUQP+/Q5cmsvVRWGhkhrIAYoGvcNhH4I tUxDZW0qW86JqZ0vw6hqyqXdDR7uhaoeuUgWoeAFSXS6SOT8/yE96aIETjL5K2nMPtqW hxoZR2rAadxJZQKWqFj4SS9Uy2MaE6QHsrfE2f/mDKrdiHF8K6Huw0k1gHcOydz2hPJO nGPADjrzNWdWBTwcuHK688hwgHzuUhLoQULZXIWAJTKPjUDj8hHLv5mS/vJUREzqjaWN XuGib+iVLhTJTNpl3+qA9mP2v1oJCAMdGVYHWLDOAQXusO48tJU41nZKUU7/o1bSWmHg 6CPQ== Received: by 10.50.195.234 with SMTP id ih10mr2446431igc.0.1337090344003; Tue, 15 May 2012 06:59:04 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.35.72 with SMTP id o8csp422490ibd; Tue, 15 May 2012 06:59:03 -0700 (PDT) Received: by 10.180.104.137 with SMTP id ge9mr8546735wib.20.1337090342657; Tue, 15 May 2012 06:59:02 -0700 (PDT) Received: from am1outboundpool.messaging.microsoft.com (am1ehsobe001.messaging.microsoft.com. [213.199.154.204]) by mx.google.com with ESMTPS id eu18si24005402wid.13.2012.05.15.06.59.02 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 15 May 2012 06:59:02 -0700 (PDT) Received-SPF: neutral (google.com: 213.199.154.204 is neither permitted nor denied by best guess record for domain of B20223@freescale.com) client-ip=213.199.154.204; Authentication-Results: mx.google.com; spf=neutral (google.com: 213.199.154.204 is neither permitted nor denied by best guess record for domain of B20223@freescale.com) smtp.mail=B20223@freescale.com Received: from mail69-am1-R.bigfish.com (10.3.201.226) by AM1EHSOBE001.bigfish.com (10.3.204.21) with Microsoft SMTP Server id 14.1.225.23; Tue, 15 May 2012 13:58:56 +0000 Received: from mail69-am1 (localhost [127.0.0.1]) by mail69-am1-R.bigfish.com (Postfix) with ESMTP id 3077032019F; Tue, 15 May 2012 13:58:56 +0000 (UTC) X-SpamScore: 0 X-BigFish: VS0(zzzz1202hzz8275bhz2dh2a8h668h839hd24he5bh) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI Received: from mail69-am1 (localhost.localdomain [127.0.0.1]) by mail69-am1 (MessageSwitch) id 1337090334793740_30463; Tue, 15 May 2012 13:58:54 +0000 (UTC) Received: from AM1EHSMHS008.bigfish.com (unknown [10.3.201.253]) by mail69-am1.bigfish.com (Postfix) with ESMTP id B782FE00EC; Tue, 15 May 2012 13:58:54 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by AM1EHSMHS008.bigfish.com (10.3.207.108) with Microsoft SMTP Server (TLS) id 14.1.225.23; Tue, 15 May 2012 13:58:54 +0000 Received: from az33smr01.freescale.net (10.64.34.199) by 039-SN1MMR1-002.039d.mgd.msft.net (10.84.1.15) with Microsoft SMTP Server id 14.2.298.5; Tue, 15 May 2012 08:58:57 -0500 Received: from b20223-02.ap.freescale.net (b20223-02.ap.freescale.net [10.192.242.124]) by az33smr01.freescale.net (8.13.1/8.13.0) with ESMTP id q4FDwjZL003112; Tue, 15 May 2012 08:58:54 -0500 (CDT) From: Richard Zhao To: , CC: , , , , , , , , , Richard Zhao Subject: [PATCH v1 2/7] usb: chipidea: remove zero check of hw_ep_max Date: Tue, 15 May 2012 21:58:18 +0800 Message-ID: <1337090303-16046-3-git-send-email-richard.zhao@freescale.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1337090303-16046-1-git-send-email-richard.zhao@freescale.com> References: <1337090303-16046-1-git-send-email-richard.zhao@freescale.com> MIME-Version: 1.0 X-OriginatorOrg: freescale.com X-Gm-Message-State: ALoCoQkfnr9Jyn71G0H9tw3/Zh4jGDuA/IYC9v+i5gUCzuuikaT5Ya2d/t4tGKbSOa6ljViy/X1y 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; dev_dbg(ci->dev, "ChipIdea HDRC found, lpm: %d; cap: %p op: %p\n",