From: Andrzej Pietrasiewicz Date: Wed, 9 Oct 2013 08:05:53 +0000 (+0200) Subject: usb: gadget: f_mass_storage: make sysfs interface optional X-Git-Tag: omap-for-v3.13/fixes-for-merge-window-take2~66^2~22^2~46 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bd528d4e699b212a763eecda9cacffb4b85a5fe6;p=pandora-kernel.git usb: gadget: f_mass_storage: make sysfs interface optional When configfs is in place, the luns will not be represented in sysfs, so there will be no struct device associated with a lun. In order to maintain compatibility and allow configfs adoption sysfs is made optional in this patch. As a consequence some debug macros need to be adjusted. Two new fields are added to struct fsg_lun: name and name_pfx. The "name" is for storing a string which is presented to the user instead of the dev_name. The "name_pfx", if non-NULL, is prepended to the "name" at printing time. The name_pfx is for a future lun.0, which will be a default group in mass_storage.. By design at USB function configfs group's creation time its name is not known (but instead set a bit later in drivers/usb/gadget/configfs.c:function_make) and it is this name that serves the purpose of the said name prefix. So instead of copying a yet-unknown string a pointer to it is stored in struct fsg_lun. Signed-off-by: Andrzej Pietrasiewicz Signed-off-by: Kyungmin Park Acked-by: Michal Nazarewicz Signed-off-by: Felipe Balbi --- Reading git-diff-tree failed