USB: g_mass_storage: Mass Storage Function created

The f_mass_storage.c has been changed into a composite function.
mass_storage.c file has been introduced which defines a
g_mass_storage gadget based on composite framework.

Signed-off-by: Michal Nazarewicz <m.nazarewicz@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Michal Nazarewicz
2009-11-09 14:15:20 +01:00
committed by Greg Kroah-Hartman
parent 6648f29d3b
commit d23b0f08d1
6 changed files with 426 additions and 500 deletions

View File

@ -594,10 +594,9 @@ static int populate_config_buf(struct usb_gadget *gadget,
if (gadget_is_dualspeed(gadget) && type == USB_DT_OTHER_SPEED_CONFIG)
speed = (USB_SPEED_FULL + USB_SPEED_HIGH) - speed;
if (gadget_is_dualspeed(gadget) && speed == USB_SPEED_HIGH)
function = fsg_hs_function;
else
function = fsg_fs_function;
function = gadget_is_dualspeed(gadget) && speed == USB_SPEED_HIGH
? (const struct usb_descriptor_header **)fsg_hs_function
: (const struct usb_descriptor_header **)fsg_fs_function;
/* for now, don't advertise srp-only devices */
if (!gadget_is_otg(gadget))