]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
usb: replace ehci_*_remove() with usb_deregister()
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Tue, 6 Sep 2016 13:17:34 +0000 (22:17 +0900)
committerTom Rini <trini@konsulko.com>
Fri, 23 Sep 2016 21:53:46 +0000 (17:53 -0400)
The remove callbacks of EHCI drivers are often just a wrapper of
ehci_deregister.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
drivers/usb/host/ehci-atmel.c
drivers/usb/host/ehci-fsl.c
drivers/usb/host/ehci-generic.c
drivers/usb/host/ehci-marvell.c
drivers/usb/host/ehci-mx6.c
drivers/usb/host/ehci-pci.c
drivers/usb/host/ehci-tegra.c
drivers/usb/host/ehci-zynq.c

index d65bbe986c9d3f07390d0041063bb77c8caf90e1..2b138c515355f97481cb362490b495665b7e4c24 100644 (file)
@@ -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),
index f5e3ae796e1cd0b149849616126fda28e5deabf2..9c3292182683952d7b488b2bdda5c85f4b41a7d7 100644 (file)
@@ -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),
index e0377ca1c9eefdc496eb7d3b267eea8aee602ab9..6291ed230bf66040090be1df1f3874a4cfbc61af 100644 (file)
@@ -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,
index 5b0f46aaef878a4e8e80effcf26762d1b4a6d3ab..253fcb3c9621fb8aa129ecb0f7d1c0dbc9e50023 100644 (file)
@@ -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),
index 602fec53948270676213b77a95736a32035151d8..48889c19562b0b91bc006cc109e5ea5688fdd4ba 100644 (file)
@@ -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),
index f21a1fa773b3ac01934a216b709dc107041d6f6f..6fc24792af9c0ebcfc280d10223de4a72ba3da43 100644 (file)
@@ -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),
index 31d54ab285bf01c9ea0e864559413f880868b46e..d3acaaecea125aff6d76b637c9ed10abd66d2173 100644 (file)
@@ -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),
index 76642cdad7de1b05b740cd3a505b62f7e4f803eb..1e3b8001f3af8c968a50cd99f4cd3d9a25e85620 100644 (file)
@@ -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),