[PATCH] drivers/usb/gadget: beautify code, delete unused code

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

 



  originally, when deleted the relative code, left some 'another'.
  need delete 'another', too.
  the relative patches are:

    commit 96f8db6a77e3490608e5b5b3f57e7201f8c85496
    Author: Felipe Balbi <balbi@xxxxxx>
    Date:   Mon Oct 10 10:33:47 2011 +0300

      usb: gadget: net2272: convert to new style


    commit 4cf5e00b055ba5e4f3852e477a2a4346730ea283
    Author: Felipe Balbi <balbi@xxxxxx>
    Date:   Mon Oct 10 10:37:17 2011 +0300

      usb: gadget: net2280: convert to new style


Signed-off-by: Chen Gang <gang.chen@xxxxxxxxxxx>
---
 drivers/usb/gadget/net2272.c |    4 ----
 drivers/usb/gadget/net2280.c |    4 ----
 2 files changed, 0 insertions(+), 8 deletions(-)

diff --git a/drivers/usb/gadget/net2272.c b/drivers/usb/gadget/net2272.c
index d226058..22ee57c 100644
--- a/drivers/usb/gadget/net2272.c
+++ b/drivers/usb/gadget/net2272.c
@@ -1484,10 +1484,6 @@ stop_activity(struct net2272 *dev, struct usb_gadget_driver *driver)
 {
 	int i;
 
-	/* don't disconnect if it's not connected */
-	if (dev->gadget.speed == USB_SPEED_UNKNOWN)
-		driver = NULL;
-
 	/* stop hardware; prevent new request submissions;
 	 * and kill any outstanding requests.
 	 */
diff --git a/drivers/usb/gadget/net2280.c b/drivers/usb/gadget/net2280.c
index a1b650e..4af3a4e 100644
--- a/drivers/usb/gadget/net2280.c
+++ b/drivers/usb/gadget/net2280.c
@@ -1935,10 +1935,6 @@ stop_activity (struct net2280 *dev, struct usb_gadget_driver *driver)
 {
 	int			i;
 
-	/* don't disconnect if it's not connected */
-	if (dev->gadget.speed == USB_SPEED_UNKNOWN)
-		driver = NULL;
-
 	/* stop hardware; prevent new request submissions;
 	 * and kill any outstanding requests.
 	 */
-- 
1.7.7.6
--
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