]> git.sur5r.net Git - u-boot/blobdiff - drivers/usb/emul/usb-emul-uclass.c
Remove unnecessary instances of DECLARE_GLOBAL_DATA_PTR
[u-boot] / drivers / usb / emul / usb-emul-uclass.c
index 1203eb2f11a8e88dc22aa6def5fa509d5eb5e5d2..01ae6dfce7852efaeab802b66873302a1c364e8b 100644 (file)
@@ -10,8 +10,6 @@
 #include <usb.h>
 #include <dm/device-internal.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 static int copy_to_unicode(char *buff, int length, const char *str)
 {
        int ptr;
@@ -52,7 +50,7 @@ static int usb_emul_get_string(struct usb_string *strings, int index,
        return -EINVAL;
 }
 
-static struct usb_generic_descriptor **find_descriptor(
+struct usb_generic_descriptor **usb_emul_find_descriptor(
                struct usb_generic_descriptor **ptr, int type, int index)
 {
        debug("%s: type=%x, index=%d\n", __func__, type, index);
@@ -91,8 +89,7 @@ static int usb_emul_get_descriptor(struct usb_dev_platdata *plat, int value,
                                           length);
        }
 
-       ptr = find_descriptor((struct usb_generic_descriptor **)plat->desc_list,
-                             type, index);
+       ptr = usb_emul_find_descriptor(plat->desc_list, type, index);
        if (!ptr) {
                debug("%s: Could not find descriptor type %d, index %d\n",
                      __func__, type, index);
@@ -295,14 +292,6 @@ int usb_emul_setup_device(struct udevice *dev, struct usb_string *strings,
        return 0;
 }
 
-void usb_emul_reset(struct udevice *dev)
-{
-       struct usb_dev_platdata *plat = dev_get_parent_platdata(dev);
-
-       plat->devnum = 0;
-       plat->configno = 0;
-}
-
 UCLASS_DRIVER(usb_emul) = {
        .id             = UCLASS_USB_EMUL,
        .name           = "usb_emul",