Convert CONFIG_USB_OHCI_NEW et al to Kconfig
[platform/kernel/u-boot.git] / drivers / usb / host / ohci-generic.c
index ed5e500..5d23058 100644 (file)
 #include <reset.h>
 #include "ohci.h"
 
-#if !defined(CONFIG_USB_OHCI_NEW)
-# error "Generic OHCI driver requires CONFIG_USB_OHCI_NEW"
-#endif
-
 struct generic_ohci {
        ohci_t ohci;
        struct clk *clocks;     /* clock list */
@@ -85,7 +81,8 @@ static int ohci_usb_probe(struct udevice *dev)
 
        err = 0;
        priv->clock_count = 0;
-       clock_nb = dev_count_phandle_with_args(dev, "clocks", "#clock-cells");
+       clock_nb = dev_count_phandle_with_args(dev, "clocks", "#clock-cells",
+                                              0);
        if (clock_nb > 0) {
                priv->clocks = devm_kcalloc(dev, clock_nb, sizeof(struct clk),
                                            GFP_KERNEL);
@@ -111,7 +108,8 @@ static int ohci_usb_probe(struct udevice *dev)
        }
 
        priv->reset_count = 0;
-       reset_nb = dev_count_phandle_with_args(dev, "resets", "#reset-cells");
+       reset_nb = dev_count_phandle_with_args(dev, "resets", "#reset-cells",
+                                              0);
        if (reset_nb > 0) {
                priv->resets = devm_kcalloc(dev, reset_nb,
                                            sizeof(struct reset_ctl),
@@ -196,6 +194,6 @@ U_BOOT_DRIVER(ohci_generic) = {
        .probe = ohci_usb_probe,
        .remove = ohci_usb_remove,
        .ops    = &ohci_usb_ops,
-       .priv_auto_alloc_size = sizeof(struct generic_ohci),
+       .priv_auto      = sizeof(struct generic_ohci),
        .flags  = DM_FLAG_ALLOC_PRIV_DMA,
 };