Skip to contentSkip to conversation

usb: gadget: function/f_hid: fix sparse warning

PATCH New Lad Prabhakar 1 participant 1 message Feb 4, 2015 USB

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb: gadget: function/f_hid: fix sparse warning

From: "Lad, Prabhakar" <[email protected]>

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

---
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(-)
drivers/usb/gadget/function/f_hid.c +1 -1
index 426d69a..a2612fb 100644
@@ -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,
Signature · 1 line
1.9.1