mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2026-02-18 10:11:16 +01:00
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: Piotr Wilczek <p.wilczek@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> CC: Lukasz Majewski <l.majewski@samsung.com> Tested-by: Heiko Schocher <hs@denx.de> Acked-by: Heiko Schocher <hs@denx.de>
This commit is contained in:
parent
7f3cf4060f
commit
12595e99e4
1 changed files with 2 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue