]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
[PATCH] USB: file-storage gadget: Add reference count for children
authorAlan Stern <stern@rowland.harvard.edu>
Wed, 9 Nov 2005 21:59:56 +0000 (16:59 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 4 Jan 2006 21:48:30 +0000 (13:48 -0800)
commit87c4252a35310fdbb2aabb880a39b83f83cadf62
treee1e5588651b6652696b9f4e81bb1776b1e4a4778
parentc9a50cc9318772e62d56f2a9172bdfda72bdacbe
[PATCH] USB: file-storage gadget: Add reference count for children

This patch (as601) adds a proper reference count to the file-storage
gadget's main data structure, to keep track of references held by child
devices (LUNs in this case).  Before this, the driver would wait for
each child to be released before unbinding.

While there's nothing really wrong with that (you can't create a hang by
doing "rmmod g_file_storage </sys/.../lun0/ro" since the open file will
prevent rmmod from running), the code might as well follow the standard
procedures.  Besides, this shrinks the size of the structure by a few
words...  :-)

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/gadget/file_storage.c