[PATCH 08/11] [Storage] Removed msf_check_params()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



msf_check_params() function has been incorporated inside the
msf_bind() function.

Signed-off-by: Michal Nazarewicz <mnazarewicz@xxxxxxxxxxx>
---
 drivers/usb/gadget/f_mass_storage.c |   41 ++++++++++++-----------------------
 1 files changed, 14 insertions(+), 27 deletions(-)

diff --git a/drivers/usb/gadget/f_mass_storage.c b/drivers/usb/gadget/f_mass_storage.c
index 374b1cb..3c523d3 100644
--- a/drivers/usb/gadget/f_mass_storage.c
+++ b/drivers/usb/gadget/f_mass_storage.c
@@ -2953,12 +2953,21 @@ static void /* __init_or_exit */ msf_unbind(struct usb_gadget *gadget)
 }


-static int __init msf_check_parameters(struct msf *msf)
+static int __init msf_bind(struct usb_gadget *gadget)
 {
-	/* Some peripheral controllers are known not to be able to
-	 * halt bulk endpoints correctly.  If one of them is present,
-	 * disable stalls.
-	 */
+	struct msf		*msf = the_msf;
+	int			rc;
+	int			i;
+	struct storage_lun	*curlun;
+	struct usb_ep		*ep;
+	struct usb_request	*req;
+	char			*pathbuf, *p;
+
+	msf->gadget = gadget;
+	set_gadget_data(gadget, msf);
+	msf->ep0 = gadget->ep0;
+	msf->ep0->driver_data = msf;
+
 	if (gadget_is_sh(msf->gadget) || gadget_is_at91(msf->gadget))
 		mod_data.can_stall = 0;

@@ -2979,28 +2988,6 @@ static int __init msf_check_parameters(struct msf *msf)
 		}
 	}

-	return 0;
-}
-
-
-static int __init msf_bind(struct usb_gadget *gadget)
-{
-	struct msf		*msf = the_msf;
-	int			rc;
-	int			i;
-	struct storage_lun	*curlun;
-	struct usb_ep		*ep;
-	struct usb_request	*req;
-	char			*pathbuf, *p;
-
-	msf->gadget = gadget;
-	set_gadget_data(gadget, msf);
-	msf->ep0 = gadget->ep0;
-	msf->ep0->driver_data = msf;
-
-	if ((rc = msf_check_parameters(msf)) != 0)
-		goto out;
-
 	if (mod_data.removable) {	// Enable the msf_store_xxx attributes
 		dev_attr_file.attr.mode = 0644;
 		dev_attr_file.store = msf_store_file;

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux