提交 f96cbd14 编写于 作者: A Andrzej Pietrasiewicz 提交者: Felipe Balbi

usb: gadget: f_fs: rename descriptor parsing functions

ffs_do_desc() handles one descriptor, while ffs_do_descs() handles a number
of descriptors. The tho names are so similar that it causes confusion.
Rename to reflect their purpose better.
Signed-off-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com>
Acked-by: NMichal Nazarewicz <mina86@mina86.com>
Signed-off-by: NFelipe Balbi <balbi@ti.com>
上级 e18366da
...@@ -1649,8 +1649,9 @@ typedef int (*ffs_entity_callback)(enum ffs_entity_type entity, ...@@ -1649,8 +1649,9 @@ typedef int (*ffs_entity_callback)(enum ffs_entity_type entity,
struct usb_descriptor_header *desc, struct usb_descriptor_header *desc,
void *priv); void *priv);
static int __must_check ffs_do_desc(char *data, unsigned len, static int __must_check ffs_do_single_desc(char *data, unsigned len,
ffs_entity_callback entity, void *priv) ffs_entity_callback entity,
void *priv)
{ {
struct usb_descriptor_header *_ds = (void *)data; struct usb_descriptor_header *_ds = (void *)data;
u8 length; u8 length;
...@@ -1802,7 +1803,7 @@ static int __must_check ffs_do_descs(unsigned count, char *data, unsigned len, ...@@ -1802,7 +1803,7 @@ static int __must_check ffs_do_descs(unsigned count, char *data, unsigned len,
if (!data) if (!data)
return _len - len; return _len - len;
ret = ffs_do_desc(data, len, entity, priv); ret = ffs_do_single_desc(data, len, entity, priv);
if (unlikely(ret < 0)) { if (unlikely(ret < 0)) {
pr_debug("%s returns %d\n", __func__, ret); pr_debug("%s returns %d\n", __func__, ret);
return ret; return ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册