Commit 12595e99 authored by Piotr Wilczek's avatar Piotr Wilczek Committed by Marek Vasut
Browse files

usb:composite: use memcpy to avoid unaligned access



This patch memcpy is used instead of an assignment to
avoid unaligned access execption on some ARM platforms.
Signed-off-by: default avatarPiotr Wilczek <p.wilczek@samsung.com>
Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
CC: Lukasz Majewski <l.majewski@samsung.com>
Tested-by: default avatarHeiko Schocher <hs@denx.de>
Acked-by: default avatarHeiko Schocher <hs@denx.de>
parent 7f3cf406
......@@ -997,7 +997,8 @@ static int composite_bind(struct usb_gadget *gadget)
if (status < 0)
goto fail;
cdev->desc = *composite->dev;
memcpy(&cdev->desc, composite->dev,
sizeof(struct usb_device_descriptor));
cdev->desc.bMaxPacketSize0 = gadget->ep0->maxpacket;
debug("%s: ready\n", composite->name);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment