[3/3] usb: gadget: storage: Remove EXPORT_SYMBOL_GPL for kref_{put, get}
From: Alan Stern <stern@rowland.harvard.edu>
Date: 2018-06-14 21:09:10
On Fri, 15 Jun 2018, Jaejoong Kim wrote:
Thanks for the review it. 2018년 6월 14일 (목) 오후 11:48, Alan Stern [off-list ref]님이 작성:quoted
On Thu, 14 Jun 2018, Jaejoong Kim wrote:quoted
Removing EXPORT_SYMBOL_GPL from kref_{put, get} since it is used only in f_mass_storage Signed-off-by: Jaejoong Kim <redacted>This is only a partial solution. In fact, fsg_common_get() isn't used anywhere, and fsg_common_put() is used in only one place.Right. Actually my first approach was to remove fsg_common_get/put and just use kref APIs(kref_get/put). But I kept current codes because this module author might have another reason.quoted
It would be better to remove those two routines, get rid of common->ref entirely, and make fsg_free_inst() call fsg_common_release() directly.Hm.. If you want to call fsg_common_release () in fsg_free_inst (), the struct kref in this moduel is meaningless. I prefer hold kref and just use kref APIs not fsg_common_get/put.
Michal Nazarewicz is the author of this part of the driver. He should make the decision of whether to keep the kref or eliminate it. Alan Stern --- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html