From b623f2cd48da234b9c7dfd73ce5332ce4377f230 Mon Sep 17 00:00:00 2001
From: S. Lockwood-Childs <sjl@vctlabs.com>
Date: Mon, 1 Sep 2014 19:27:30 -0700
Subject: [PATCH] gadgetfs: fix module refcount

Go back to letting gadgetfs file opens bump the module refcount,
because otherwise the refcount gets a net decrease every time a
gadgetfs-using application exits. At least this way the gets and puts
are balanced, keeping things sane.

Signed-off-by: S. Lockwood-Childs <sjl@vctlabs.com>
---
 drivers/usb/gadget/inode.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/usb/gadget/inode.c b/drivers/usb/gadget/inode.c
index e96077b..afd44c3 100644
--- a/drivers/usb/gadget/inode.c
+++ b/drivers/usb/gadget/inode.c
@@ -903,6 +903,7 @@ ep_open (struct inode *inode, struct file *fd)
 
 /* used before endpoint configuration */
 static const struct file_operations ep_config_operations = {
+	.owner =	THIS_MODULE,
 	.llseek =	no_llseek,
 
 	.open =		ep_open,
@@ -1957,6 +1958,7 @@ dev_open (struct inode *inode, struct file *fd)
 }
 
 static const struct file_operations dev_init_operations = {
+	.owner =	THIS_MODULE,
 	.llseek =	no_llseek,
 
 	.open =		dev_open,
-- 
1.8.1.5

