提交 2b87cd24 编写于 作者: L Lad, Prabhakar 提交者: Felipe Balbi

usb: gadget: gadgetfs: fix sparse warnings

this patch fixes following sparse warnings:

g_ffs.c:136:3: warning: symbol 'gfs_configurations' was not declared. Should it be static?
g_ffs.c:281:16: warning: Using plain integer as NULL pointer
Signed-off-by: NLad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: NFelipe Balbi <balbi@ti.com>
上级 70685711
...@@ -133,7 +133,9 @@ struct gfs_configuration { ...@@ -133,7 +133,9 @@ struct gfs_configuration {
struct usb_configuration c; struct usb_configuration c;
int (*eth)(struct usb_configuration *c); int (*eth)(struct usb_configuration *c);
int num; int num;
} gfs_configurations[] = { };
static struct gfs_configuration gfs_configurations[] = {
#ifdef CONFIG_USB_FUNCTIONFS_RNDIS #ifdef CONFIG_USB_FUNCTIONFS_RNDIS
{ {
.eth = bind_rndis_config, .eth = bind_rndis_config,
...@@ -278,7 +280,7 @@ static void *functionfs_acquire_dev(struct ffs_dev *dev) ...@@ -278,7 +280,7 @@ static void *functionfs_acquire_dev(struct ffs_dev *dev)
if (!try_module_get(THIS_MODULE)) if (!try_module_get(THIS_MODULE))
return ERR_PTR(-ENOENT); return ERR_PTR(-ENOENT);
return 0; return NULL;
} }
static void functionfs_release_dev(struct ffs_dev *dev) static void functionfs_release_dev(struct ffs_dev *dev)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册