提交 6f480bf9 编写于 作者: M Márton Németh 提交者: Greg Kroah-Hartman

usbip: simplify port status saving

Use memcpy() function to save port status instead of
a handwritten for loop.
Signed-off-by: NMárton Németh <nm127@freemail.hu>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 4a3ca2be
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册