[PATCH 5/8] usb/dummy_hcd: remove the HS vs SS module paramter

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

 



The attached gadget is automaticly passed to the correct hcd so there is
no need to specify that via the module parameter. I was able to load
g_zero dummy which was passed to the 2.0 hcd controller.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
---
 drivers/usb/gadget/dummy_hcd.c |   25 +------------------------
 1 files changed, 1 insertions(+), 24 deletions(-)

diff --git a/drivers/usb/gadget/dummy_hcd.c b/drivers/usb/gadget/dummy_hcd.c
index 41d7d36..a803dda 100644
--- a/drivers/usb/gadget/dummy_hcd.c
+++ b/drivers/usb/gadget/dummy_hcd.c
@@ -70,19 +70,6 @@ MODULE_DESCRIPTION (DRIVER_DESC);
 MODULE_AUTHOR ("David Brownell");
 MODULE_LICENSE ("GPL");
 
-struct dummy_hcd_module_parameters {
-	bool is_super_speed;
-	bool is_high_speed;
-};
-
-static struct dummy_hcd_module_parameters mod_data = {
-	.is_super_speed = false,
-	.is_high_speed = true,
-};
-module_param_named(is_super_speed, mod_data.is_super_speed, bool, S_IRUGO);
-MODULE_PARM_DESC(is_super_speed, "true to simulate SuperSpeed connection");
-module_param_named(is_high_speed, mod_data.is_high_speed, bool, S_IRUGO);
-MODULE_PARM_DESC(is_high_speed, "true to simulate HighSpeed connection");
 /*-------------------------------------------------------------------------*/
 
 /* gadget side driver data structres */
@@ -831,13 +818,8 @@ static int dummy_pullup (struct usb_gadget *_gadget, int value)
 	dum = gadget_dev_to_dummy(&_gadget->dev);
 
 	if (value && dum->driver) {
-		if (mod_data.is_super_speed)
-			dum->gadget.speed = dum->driver->speed;
-		else if (mod_data.is_high_speed)
-			dum->gadget.speed = min_t(u8, USB_SPEED_HIGH,
+		dum->gadget.speed = min_t(u8, USB_SPEED_SUPER,
 					dum->driver->speed);
-		else
-			dum->gadget.speed = USB_SPEED_FULL;
 		dummy_udc_udpate_ep0(dum);
 	}
 	dum_hcd = gadget_to_dummy_hcd(_gadget);
@@ -2319,8 +2301,6 @@ static int dummy_hcd_probe(struct platform_device *pdev)
 
 	dev_info(&pdev->dev, "%s, driver " DRIVER_VERSION "\n", driver_desc);
 
-	if (!mod_data.is_super_speed)
-		dummy_hcd.flags = HCD_USB2;
 	hs_hcd = usb_create_hcd(&dummy_hcd, &pdev->dev, dev_name(&pdev->dev));
 	if (!hs_hcd)
 		return -ENOMEM;
@@ -2425,9 +2405,6 @@ static int __init init (void)
 	if (usb_disabled ())
 		return -ENODEV;
 
-	if (!mod_data.is_high_speed && mod_data.is_super_speed)
-		return -EINVAL;
-
 	the_hcd_pdev = platform_device_alloc(driver_name, -1);
 	if (!the_hcd_pdev)
 		return retval;
-- 
1.7.4.4

--
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