From: Takashi Iwai Date: Thu, 5 Feb 2015 13:36:25 +0000 (+0100) Subject: USB: gadget: f_mass_storage: use static attribute groups for sysfs entries X-Git-Tag: omap-for-v4.1/fixes-rc1~167^2~67 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c7b364f7dd82e8610373b8c6d788db867d7e99db;p=pandora-kernel.git USB: gadget: f_mass_storage: use static attribute groups for sysfs entries Instead of manual device_create_file() and device_remove_file() calls, assign the static attribute groups to the lun device to register. The RO or RW permissions for some entries are decided in is_visible callback. This simplifies the code (also the logic) and avoids the possible races, too. Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed