From patchwork Tue Sep 6 13:17:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 75515 Delivered-To: patch@linaro.org Received: by 10.140.106.11 with SMTP id d11csp545173qgf; Tue, 6 Sep 2016 06:19:42 -0700 (PDT) X-Received: by 10.194.57.244 with SMTP id l20mr35986021wjq.1.1473167980647; Tue, 06 Sep 2016 06:19:40 -0700 (PDT) Return-Path: Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id h129si14506527wmf.71.2016.09.06.06.19.40; Tue, 06 Sep 2016 06:19:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) client-ip=85.214.87.163; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id F0CB54BA16; Tue, 6 Sep 2016 15:19:39 +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 hKWfJd_3hd-N; Tue, 6 Sep 2016 15:19:39 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5B16AB3834; Tue, 6 Sep 2016 15:17:29 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E1373B380F for ; Tue, 6 Sep 2016 15:17:03 +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 2PCQ1UHxxOlw for ; Tue, 6 Sep 2016 15:17:03 +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 conuserg-10.nifty.com (conuserg-10.nifty.com [210.131.2.77]) by theia.denx.de (Postfix) with ESMTPS id 2F9294BD3D for ; Tue, 6 Sep 2016 15:16:41 +0200 (CEST) Received: from beagle.diag.org (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-10.nifty.com with ESMTP id u86DFbis013304; Tue, 6 Sep 2016 22:15:41 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com u86DFbis013304 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1473167742; bh=SW48NqxEqBEDRaaVopWWqJKV9EGw55ED8zbl3k6yJZ4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=G6mCX/0NebgeaJKdSGr/MNXWlZMBzQaZdxFp1RzZLllYqSILQzsC7+tBYPe8T+Z/E ZgiyhFrfs+LTPUrPMjbIsQWkkkUJFiofv5JT+Hp1g7SG/fAn93aVvdbJI+xfRgc8ot +nUNRrvFefbRYZ2JlOyuZsglisWKQ50zG5Q6CXgv0eb1GDHGx7W38IbJsT9xjG1ybx 32InNhhi5luACT0aU8bV+TNX1YIyqPj7BXlHPnrx2CLmPgopiOuQPVy4/2Eqo066Pt IUhM3IiljnR5l8rDjtBwMnK4pt1Tn+i0sSsK+VqAdBpTGm29xG4kQ38UdK6o1wtkvu sNHv66zw5WunQ== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Tue, 6 Sep 2016 22:17:34 +0900 Message-Id: <1473167860-27465-4-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1473167860-27465-1-git-send-email-yamada.masahiro@socionext.com> References: <1473167860-27465-1-git-send-email-yamada.masahiro@socionext.com> Cc: Marek Vasut , Stephen Warren , Stefan Agner , Alexey Brodkin , Stefan Roese Subject: [U-Boot] [PATCH v3 3/8] usb: replace ehci_*_remove() with usb_deregister() 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" The remove callbacks of EHCI drivers are often just a wrapper of ehci_deregister. Signed-off-by: Masahiro Yamada --- Changes in v3: - added drivers/usb/host/ehci-atmel.c | 13 +------------ drivers/usb/host/ehci-fsl.c | 13 +------------ drivers/usb/host/ehci-generic.c | 7 +------ drivers/usb/host/ehci-marvell.c | 13 +------------ drivers/usb/host/ehci-mx6.c | 13 +------------ drivers/usb/host/ehci-pci.c | 13 +------------ drivers/usb/host/ehci-tegra.c | 13 +------------ drivers/usb/host/ehci-zynq.c | 13 +------------ 8 files changed, 8 insertions(+), 90 deletions(-) -- 1.9.1 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot diff --git a/drivers/usb/host/ehci-atmel.c b/drivers/usb/host/ehci-atmel.c index d65bbe9..2b138c5 100644 --- a/drivers/usb/host/ehci-atmel.c +++ b/drivers/usb/host/ehci-atmel.c @@ -128,17 +128,6 @@ static int ehci_atmel_probe(struct udevice *dev) return ehci_register(dev, hccr, hcor, NULL, 0, USB_INIT_HOST); } -static int ehci_atmel_remove(struct udevice *dev) -{ - int ret; - - ret = ehci_deregister(dev); - if (ret) - return ret; - - return 0; -} - static const struct udevice_id ehci_usb_ids[] = { { .compatible = "atmel,at91sam9g45-ehci", }, { } @@ -149,7 +138,7 @@ U_BOOT_DRIVER(ehci_atmel) = { .id = UCLASS_USB, .of_match = ehci_usb_ids, .probe = ehci_atmel_probe, - .remove = ehci_atmel_remove, + .remove = ehci_deregister, .ops = &ehci_usb_ops, .platdata_auto_alloc_size = sizeof(struct usb_platdata), .priv_auto_alloc_size = sizeof(struct ehci_atmel_priv), diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c index f5e3ae7..9c32921 100644 --- a/drivers/usb/host/ehci-fsl.c +++ b/drivers/usb/host/ehci-fsl.c @@ -118,17 +118,6 @@ static int ehci_fsl_probe(struct udevice *dev) return ehci_register(dev, hccr, hcor, &fsl_ehci_ops, 0, USB_INIT_HOST); } -static int ehci_fsl_remove(struct udevice *dev) -{ - int ret; - - ret = ehci_deregister(dev); - if (ret) - return ret; - - return 0; -} - static const struct udevice_id ehci_usb_ids[] = { { .compatible = "fsl-usb2-mph", }, { .compatible = "fsl-usb2-dr", }, @@ -141,7 +130,7 @@ U_BOOT_DRIVER(ehci_fsl) = { .of_match = ehci_usb_ids, .ofdata_to_platdata = ehci_fsl_ofdata_to_platdata, .probe = ehci_fsl_probe, - .remove = ehci_fsl_remove, + .remove = ehci_deregister, .ops = &ehci_usb_ops, .platdata_auto_alloc_size = sizeof(struct usb_platdata), .priv_auto_alloc_size = sizeof(struct ehci_fsl_priv), diff --git a/drivers/usb/host/ehci-generic.c b/drivers/usb/host/ehci-generic.c index e0377ca..6291ed2 100644 --- a/drivers/usb/host/ehci-generic.c +++ b/drivers/usb/host/ehci-generic.c @@ -44,11 +44,6 @@ static int ehci_usb_probe(struct udevice *dev) return ehci_register(dev, hccr, hcor, NULL, 0, USB_INIT_HOST); } -static int ehci_usb_remove(struct udevice *dev) -{ - return ehci_deregister(dev); -} - static const struct udevice_id ehci_usb_ids[] = { { .compatible = "generic-ehci" }, { } @@ -59,7 +54,7 @@ U_BOOT_DRIVER(ehci_generic) = { .id = UCLASS_USB, .of_match = ehci_usb_ids, .probe = ehci_usb_probe, - .remove = ehci_usb_remove, + .remove = ehci_deregister, .ops = &ehci_usb_ops, .priv_auto_alloc_size = sizeof(struct generic_ehci), .flags = DM_FLAG_ALLOC_PRIV_DMA, diff --git a/drivers/usb/host/ehci-marvell.c b/drivers/usb/host/ehci-marvell.c index 5b0f46a..253fcb3 100644 --- a/drivers/usb/host/ehci-marvell.c +++ b/drivers/usb/host/ehci-marvell.c @@ -94,17 +94,6 @@ static int ehci_mvebu_probe(struct udevice *dev) return ehci_register(dev, hccr, hcor, NULL, 0, USB_INIT_HOST); } -static int ehci_mvebu_remove(struct udevice *dev) -{ - int ret; - - ret = ehci_deregister(dev); - if (ret) - return ret; - - return 0; -} - static const struct udevice_id ehci_usb_ids[] = { { .compatible = "marvell,orion-ehci", }, { } @@ -115,7 +104,7 @@ U_BOOT_DRIVER(ehci_mvebu) = { .id = UCLASS_USB, .of_match = ehci_usb_ids, .probe = ehci_mvebu_probe, - .remove = ehci_mvebu_remove, + .remove = ehci_deregister, .ops = &ehci_usb_ops, .platdata_auto_alloc_size = sizeof(struct usb_platdata), .priv_auto_alloc_size = sizeof(struct ehci_mvebu_priv), diff --git a/drivers/usb/host/ehci-mx6.c b/drivers/usb/host/ehci-mx6.c index 602fec5..48889c1 100644 --- a/drivers/usb/host/ehci-mx6.c +++ b/drivers/usb/host/ehci-mx6.c @@ -451,17 +451,6 @@ static int ehci_usb_probe(struct udevice *dev) return ehci_register(dev, hccr, hcor, &mx6_ehci_ops, 0, priv->init_type); } -static int ehci_usb_remove(struct udevice *dev) -{ - int ret; - - ret = ehci_deregister(dev); - if (ret) - return ret; - - return 0; -} - static const struct udevice_id mx6_usb_ids[] = { { .compatible = "fsl,imx27-usb" }, { } @@ -472,7 +461,7 @@ U_BOOT_DRIVER(usb_mx6) = { .id = UCLASS_USB, .of_match = mx6_usb_ids, .probe = ehci_usb_probe, - .remove = ehci_usb_remove, + .remove = ehci_deregister, .ops = &ehci_usb_ops, .platdata_auto_alloc_size = sizeof(struct usb_platdata), .priv_auto_alloc_size = sizeof(struct ehci_mx6_priv_data), diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c index f21a1fa..6fc2479 100644 --- a/drivers/usb/host/ehci-pci.c +++ b/drivers/usb/host/ehci-pci.c @@ -126,17 +126,6 @@ static int ehci_pci_probe(struct udevice *dev) return ehci_register(dev, hccr, hcor, NULL, 0, USB_INIT_HOST); } -static int ehci_pci_remove(struct udevice *dev) -{ - int ret; - - ret = ehci_deregister(dev); - if (ret) - return ret; - - return 0; -} - static const struct udevice_id ehci_pci_ids[] = { { .compatible = "ehci-pci" }, { } @@ -146,7 +135,7 @@ U_BOOT_DRIVER(ehci_pci) = { .name = "ehci_pci", .id = UCLASS_USB, .probe = ehci_pci_probe, - .remove = ehci_pci_remove, + .remove = ehci_deregister, .of_match = ehci_pci_ids, .ops = &ehci_usb_ops, .platdata_auto_alloc_size = sizeof(struct usb_platdata), diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c index 31d54ab..d3acaae 100644 --- a/drivers/usb/host/ehci-tegra.c +++ b/drivers/usb/host/ehci-tegra.c @@ -846,17 +846,6 @@ static int ehci_usb_probe(struct udevice *dev) plat->init_type); } -static int ehci_usb_remove(struct udevice *dev) -{ - int ret; - - ret = ehci_deregister(dev); - if (ret) - return ret; - - return 0; -} - static const struct udevice_id ehci_usb_ids[] = { { .compatible = "nvidia,tegra20-ehci", .data = USB_CTLR_T20 }, { .compatible = "nvidia,tegra30-ehci", .data = USB_CTLR_T30 }, @@ -871,7 +860,7 @@ U_BOOT_DRIVER(usb_ehci) = { .of_match = ehci_usb_ids, .ofdata_to_platdata = ehci_usb_ofdata_to_platdata, .probe = ehci_usb_probe, - .remove = ehci_usb_remove, + .remove = ehci_deregister, .ops = &ehci_usb_ops, .platdata_auto_alloc_size = sizeof(struct usb_platdata), .priv_auto_alloc_size = sizeof(struct fdt_usb), diff --git a/drivers/usb/host/ehci-zynq.c b/drivers/usb/host/ehci-zynq.c index 76642cd..1e3b800 100644 --- a/drivers/usb/host/ehci-zynq.c +++ b/drivers/usb/host/ehci-zynq.c @@ -73,17 +73,6 @@ static int ehci_zynq_probe(struct udevice *dev) return ehci_register(dev, hccr, hcor, NULL, 0, plat->init_type); } -static int ehci_zynq_remove(struct udevice *dev) -{ - int ret; - - ret = ehci_deregister(dev); - if (ret) - return ret; - - return 0; -} - static const struct udevice_id ehci_zynq_ids[] = { { .compatible = "xlnx,zynq-usb-2.20a" }, { } @@ -95,7 +84,7 @@ U_BOOT_DRIVER(ehci_zynq) = { .of_match = ehci_zynq_ids, .ofdata_to_platdata = ehci_zynq_ofdata_to_platdata, .probe = ehci_zynq_probe, - .remove = ehci_zynq_remove, + .remove = ehci_deregister, .ops = &ehci_usb_ops, .platdata_auto_alloc_size = sizeof(struct usb_platdata), .priv_auto_alloc_size = sizeof(struct zynq_ehci_priv),