From patchwork Tue Sep 8 17:15:12 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 515477 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id EA628140157 for ; Wed, 9 Sep 2015 03:16:15 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b=aupvtSwu; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 16E044B7BE; Tue, 8 Sep 2015 19:15:56 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CKqXs1KRyhoB; Tue, 8 Sep 2015 19:15:55 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8A0A34B7DC; Tue, 8 Sep 2015 19:15:47 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id F292A4B778 for ; Tue, 8 Sep 2015 19:15:33 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0Mf_okvG5G3e for ; Tue, 8 Sep 2015 19:15:33 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-io0-f178.google.com (mail-io0-f178.google.com [209.85.223.178]) by theia.denx.de (Postfix) with ESMTPS id 28E524B78B for ; Tue, 8 Sep 2015 19:15:27 +0200 (CEST) Received: by iofh134 with SMTP id h134so126329912iof.0 for ; Tue, 08 Sep 2015 10:15:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=OTyXJV7z1g2fb5KXCFPSSw+5KsucHq9RgoRtdpZqnqc=; b=aupvtSwuWYZLuVxHXVLHL9iPIZt8VaNsag53GLWnEujL4jTvDih2JZLj6hJMmGkwh2 kEQeYcwtzfelLQNcMiCSOGoh9PKOs/St0qETP3ceGUctNzZ1i822cOmPAKs04kYLyux8 jlqcaDZAl+YZ6HAHIJPCal9VYQppO557HV0CtLBvVol9+66BJnN98bnv3rJoMtt8284n V1hmTaRKc3vs38gre6duxwlBCcWBf8wiMHeahIbp2UBn4Fvc6zBYzMTbYFqqhfF2zgjn R0zeL5t8murxWskMr9Mcd7297+ulrVoKKK/7Ebr1ttC0aDRbI67TmzsfkVeO/V/TvgVo /YQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=OTyXJV7z1g2fb5KXCFPSSw+5KsucHq9RgoRtdpZqnqc=; b=V5HjUoGX2flr0yI0ocODyjNu2TqbR6UCpbHsoS23EegVgwt/DpveyHSbq8Pu8NOVXD 3u/ncHeOXQVPY7f/b2iyCrQQv3b4p11+AAWP1Cm33fBz0SquwwMKPq3J1pTv5BZuC/Ma xvja8J6UbHiCnJNFbod4nDusZUt5+cQfIBv9ffZOk6CO0MW360Mt+0ryH/hVNqZRI/wJ erRRdAxgqU3I/NId5diSunRq+XNH3Nk8pGvYC1gBPIzhnX+O7BACYHuHXR3OXwRhRZw9 25jBInIFNZ1x5Mi9MtbBY9QMo1Z/LDcPRlQkxRLgtmxdLrAZb5WQEXHFpzB6qn03KOHs yEVg== X-Gm-Message-State: ALoCoQkvH/288MdvqUX5hjbhOVvJfrhnbRbry8T35dJQO3DzOI6bytIWO4nhtoZoNuNWy2WMvUl1 X-Received: by 10.107.35.78 with SMTP id j75mr7880790ioj.123.1441732526234; Tue, 08 Sep 2015 10:15:26 -0700 (PDT) Received: from kaki.bld.corp.google.com ([172.29.216.32]) by smtp.gmail.com with ESMTPSA id 20sm2602048iof.18.2015.09.08.10.15.24 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Sep 2015 10:15:24 -0700 (PDT) Received: by kaki.bld.corp.google.com (Postfix, from userid 121222) id 0545C22101B; Tue, 8 Sep 2015 11:15:23 -0600 (MDT) From: Simon Glass To: U-Boot Mailing List Date: Tue, 8 Sep 2015 11:15:12 -0600 Message-Id: <1441732512-727-6-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 2.5.0.457.gab17608 In-Reply-To: <1441732512-727-1-git-send-email-sjg@chromium.org> References: <1441732512-727-1-git-send-email-sjg@chromium.org> Cc: Marek Vasut , Tom Rini Subject: [U-Boot] [PATCH 5/5] dm: usb: Deprecate usb_get_dev_index() X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This function should not be used with driver model. While there are users of USB Ethernet that use driver model for USB but not Ethernet, we have to keep it around. Add a comment to that effect. Signed-off-by: Simon Glass --- drivers/usb/host/usb-uclass.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/usb/host/usb-uclass.c b/drivers/usb/host/usb-uclass.c index ebe22d6..243e699 100644 --- a/drivers/usb/host/usb-uclass.c +++ b/drivers/usb/host/usb-uclass.c @@ -278,6 +278,14 @@ int usb_init(void) return usb_started ? 0 : -1; } +/* + * TODO(sjg@chromium.org): Remove this legacy function. At present it is needed + * to support boards which use driver model for USB but not Ethernet, and want + * to use USB Ethernet. + * + * The #if clause is here to ensure that remains the only case. + */ +#if !defined(CONFIG_DM_ETH) && defined(CONFIG_USB_HOST_ETHER) static struct usb_device *find_child_devnum(struct udevice *parent, int devnum) { struct usb_device *udev; @@ -311,6 +319,7 @@ struct usb_device *usb_get_dev_index(struct udevice *bus, int index) return find_child_devnum(dev, devnum); } +#endif int usb_post_bind(struct udevice *dev) {