[PATCH] usb: gadget: function/f_hid: fix sparse warning

From: Lad Prabhakar
Date: Wed Feb 04 2015 - 12:50:00 EST


From: "Lad, Prabhakar" <prabhakar.csengg@xxxxxxxxx>

this patch fixes following sparse warning:
f_hid.c:572:30: warning: symbol 'f_hidg_fops' was not declared. Should it be static?

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@xxxxxxxxx>
---
Found this issue on linux-next (gcc version 4.8.2,
sparse version 0.4.5-rc1)and applies on top linux-next.

drivers/usb/gadget/function/f_hid.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/function/f_hid.c b/drivers/usb/gadget/function/f_hid.c
index 426d69a..a2612fb 100644
--- a/drivers/usb/gadget/function/f_hid.c
+++ b/drivers/usb/gadget/function/f_hid.c
@@ -569,7 +569,7 @@ fail:
return status;
}

-const struct file_operations f_hidg_fops = {
+static const struct file_operations f_hidg_fops = {
.owner = THIS_MODULE,
.open = f_hidg_open,
.release = f_hidg_release,
--
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/