diff options
Diffstat (limited to 'drivers/usb/gadget/file_storage.c')
-rw-r--r-- | drivers/usb/gadget/file_storage.c | 33 |
1 files changed, 7 insertions, 26 deletions
diff --git a/drivers/usb/gadget/file_storage.c b/drivers/usb/gadget/file_storage.c index 4f57085619b4..a41d9d4baee3 100644 --- a/drivers/usb/gadget/file_storage.c +++ b/drivers/usb/gadget/file_storage.c | |||
@@ -3713,6 +3713,7 @@ static void fsg_unbind(struct usb_gadget *gadget) | |||
3713 | static int __init check_parameters(struct fsg_dev *fsg) | 3713 | static int __init check_parameters(struct fsg_dev *fsg) |
3714 | { | 3714 | { |
3715 | int prot; | 3715 | int prot; |
3716 | int gcnum; | ||
3716 | 3717 | ||
3717 | /* Store the default values */ | 3718 | /* Store the default values */ |
3718 | mod_data.transport_type = USB_PR_BULK; | 3719 | mod_data.transport_type = USB_PR_BULK; |
@@ -3724,33 +3725,13 @@ static int __init check_parameters(struct fsg_dev *fsg) | |||
3724 | mod_data.can_stall = 0; | 3725 | mod_data.can_stall = 0; |
3725 | 3726 | ||
3726 | if (mod_data.release == 0xffff) { // Parameter wasn't set | 3727 | if (mod_data.release == 0xffff) { // Parameter wasn't set |
3727 | if (gadget_is_net2280(fsg->gadget)) | ||
3728 | mod_data.release = 0x0301; | ||
3729 | else if (gadget_is_dummy(fsg->gadget)) | ||
3730 | mod_data.release = 0x0302; | ||
3731 | else if (gadget_is_pxa(fsg->gadget)) | ||
3732 | mod_data.release = 0x0303; | ||
3733 | else if (gadget_is_sh(fsg->gadget)) | ||
3734 | mod_data.release = 0x0304; | ||
3735 | |||
3736 | /* The sa1100 controller is not supported */ | 3728 | /* The sa1100 controller is not supported */ |
3737 | 3729 | if (gadget_is_sa1100(fsg->gadget)) | |
3738 | else if (gadget_is_goku(fsg->gadget)) | 3730 | gcnum = -1; |
3739 | mod_data.release = 0x0306; | 3731 | else |
3740 | else if (gadget_is_mq11xx(fsg->gadget)) | 3732 | gcnum = usb_gadget_controller_number(fsg->gadget); |
3741 | mod_data.release = 0x0307; | 3733 | if (gcnum >= 0) |
3742 | else if (gadget_is_omap(fsg->gadget)) | 3734 | mod_data.release = 0x0300 + gcnum; |
3743 | mod_data.release = 0x0308; | ||
3744 | else if (gadget_is_lh7a40x(fsg->gadget)) | ||
3745 | mod_data.release = 0x0309; | ||
3746 | else if (gadget_is_n9604(fsg->gadget)) | ||
3747 | mod_data.release = 0x0310; | ||
3748 | else if (gadget_is_pxa27x(fsg->gadget)) | ||
3749 | mod_data.release = 0x0311; | ||
3750 | else if (gadget_is_s3c2410(gadget)) | ||
3751 | mod_data.release = 0x0312; | ||
3752 | else if (gadget_is_at91(fsg->gadget)) | ||
3753 | mod_data.release = 0x0313; | ||
3754 | else { | 3735 | else { |
3755 | WARN(fsg, "controller '%s' not recognized\n", | 3736 | WARN(fsg, "controller '%s' not recognized\n", |
3756 | fsg->gadget->name); | 3737 | fsg->gadget->name); |