usb: replace ehci_*_remove() with usb_deregister()
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>
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 @@
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 @@
.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),