[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <4DF68161.5060304@freemail.hu>
Date: Mon, 13 Jun 2011 23:30:09 +0200
From: Németh Márton <nm127@...email.hu>
To: Greg Kroah-Hartman <gregkh@...e.de>,
Matt Mooney <mfm@...eddisk.com>,
Max Vozeler <max@...terhof.net>,
Sarah Sharp <sarah.a.sharp@...ux.intel.com>,
usbip-devel@...ts.sourceforge.net, devel@...verdev.osuosl.org
CC: LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH 3/3] usbip: simplify port status saving
From: Márton Németh <nm127@...email.hu>
Use memcpy() function to save port status instead of
a handwritten for loop.
Signed-off-by: Márton Németh <nm127@...email.hu>
---
drivers/staging/usbip/vhci_hcd.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/usbip/vhci_hcd.c b/drivers/staging/usbip/vhci_hcd.c
index d3ce569..ccb30e1 100644
--- a/drivers/staging/usbip/vhci_hcd.c
+++ b/drivers/staging/usbip/vhci_hcd.c
@@ -281,9 +281,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) {
--
1.7.2.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists