Skip to contentSkip to conversation

usb: gadget: storage: Remove EXPORT_SYMBOL_GPL for kref_{put, get}

PATCH New Jaejoong Kim 1 participant 1 message Jun 14, 2018 USB

lore
Share & tools
lore
#0 lore raw

PATCH 3/3 usb: gadget: storage: Remove EXPORT_SYMBOL_GPL for kref_{put, get}

Removing EXPORT_SYMBOL_GPL from kref_{put, get} since it is used only in f_mass_storage

---
 drivers/usb/gadget/function/f_mass_storage.c | 6 ++----
 drivers/usb/gadget/function/f_mass_storage.h | 4 ----
 2 files changed, 2 insertions(+), 8 deletions(-)
drivers/usb/gadget/function/f_mass_storage.c +2 -4
index b6e2930..ba0eb7e 100644
@@ -2558,17 +2558,15 @@ static void fsg_lun_release(struct device *dev)
 	/* Nothing needs to be done */
 }
 
-void fsg_common_get(struct fsg_common *common)
+static void __maybe_unused fsg_common_get(struct fsg_common *common)
 {
 	kref_get(&common->ref);
 }
-EXPORT_SYMBOL_GPL(fsg_common_get);
 
-void fsg_common_put(struct fsg_common *common)
+static void fsg_common_put(struct fsg_common *common)
 {
 	kref_put(&common->ref, fsg_common_release);
 }
-EXPORT_SYMBOL_GPL(fsg_common_put);
 
 static struct fsg_common *fsg_common_setup(struct fsg_common *common)
 {
drivers/usb/gadget/function/f_mass_storage.h +0 -4
index 58857fc..3b8c4ce 100644
@@ -115,10 +115,6 @@ fsg_opts_from_func_inst(const struct usb_function_instance *fi)
 	return container_of(fi, struct fsg_opts, func_inst);
 }
 
-void fsg_common_get(struct fsg_common *common);
-
-void fsg_common_put(struct fsg_common *common);
-
 void fsg_common_set_sysfs(struct fsg_common *common, bool sysfs);
 
 int fsg_common_set_num_buffers(struct fsg_common *common, unsigned int n);