diff options
author | Bin Meng <bmeng.cn@gmail.com> | 2017-10-01 06:19:40 -0700 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2017-10-01 16:32:51 +0200 |
commit | 848436a48d21447fc78bef67a4cbf11392536de2 (patch) | |
tree | 55e19875f5bb5c3b5b72af3faad3cbce3c080af9 /drivers/usb/emul/usb-emul-uclass.c | |
parent | 84aa8536f0197e439832f56cc7b554af488fc3c8 (diff) |
usb: emul: Expose find_descriptor() as a public API
This can be useful outside of the sandbox usb emulation uclass
driver. Expose it as a public API with a proper prefix (usb_emul_).
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'drivers/usb/emul/usb-emul-uclass.c')
-rw-r--r-- | drivers/usb/emul/usb-emul-uclass.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/usb/emul/usb-emul-uclass.c b/drivers/usb/emul/usb-emul-uclass.c index 1203eb2f11..359d0da07e 100644 --- a/drivers/usb/emul/usb-emul-uclass.c +++ b/drivers/usb/emul/usb-emul-uclass.c @@ -52,7 +52,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 +91,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); |