summaryrefslogtreecommitdiffstats
path: root/drivers/staging/usbip/vhci_hcd.c
diff options
context:
space:
mode:
authorMárton Németh2011-06-13 23:30:09 +0200
committerGreg Kroah-Hartman2011-07-06 04:59:19 +0200
commit6f480bf9c3bf6c1241024c1763d12d025ff02292 (patch)
tree290fd39353f18d971184fe0affe164e180cd8874 /drivers/staging/usbip/vhci_hcd.c
parentusbip: dump the port status difference (diff)
downloadkernel-qcow2-linux-6f480bf9c3bf6c1241024c1763d12d025ff02292.tar.gz
kernel-qcow2-linux-6f480bf9c3bf6c1241024c1763d12d025ff02292.tar.xz
kernel-qcow2-linux-6f480bf9c3bf6c1241024c1763d12d025ff02292.zip
usbip: simplify port status saving
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>
Diffstat (limited to 'drivers/staging/usbip/vhci_hcd.c')
-rw-r--r--drivers/staging/usbip/vhci_hcd.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/staging/usbip/vhci_hcd.c b/drivers/staging/usbip/vhci_hcd.c
index d3f11a34d513..878b5bf3f46c 100644
--- a/drivers/staging/usbip/vhci_hcd.c
+++ b/drivers/staging/usbip/vhci_hcd.c
@@ -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) {