usbip: simplify port status saving
authorMárton Németh <nm127@freemail.hu>
Mon, 13 Jun 2011 21:30:09 +0000 (23:30 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 6 Jul 2011 02:59:19 +0000 (19:59 -0700)
Use memcpy() function to save port status instead of
a handwritten for loop.

Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/usbip/vhci_hcd.c

index d3f11a34d5130703a2083ad3737ee665395cf595..878b5bf3f46cfc6ef6da98e892494df633167cd6 100644 (file)
@@ -287,9 +287,8 @@ static int vhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
 
        /* store old status and compare now and old later */
        if (usbip_dbg_flag_vhci_rh) {
-               int i = 0;
-               for (i = 0; i < VHCI_NPORTS; i++)
-                       prev_port_status[i] = dum->port_status[i];
+               memcpy(prev_port_status, dum->port_status,
+                       sizeof(prev_port_status));
        }
 
        switch (typeReq) {