From: Mikael Pettersson Date: Sun, 24 Sep 2006 00:05:31 +0000 (-0700) Subject: USB: Fix alignment of buffer passed down to ->hub_control() X-Git-Tag: v2.6.19-rc1~876 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=54bee6e1b455573658972510a76119f279db32b7;p=linux-2.6-omap-h63xx.git USB: Fix alignment of buffer passed down to ->hub_control() Implementations assume the buffer is at least 4 byte aligned. Signed-off-by: David S. Miller Cc: David Brownell Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index e86f6295708..0d5cbf254e5 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c @@ -345,7 +345,8 @@ static int rh_call_control (struct usb_hcd *hcd, struct urb *urb) struct usb_ctrlrequest *cmd; u16 typeReq, wValue, wIndex, wLength; u8 *ubuf = urb->transfer_buffer; - u8 tbuf [sizeof (struct usb_hub_descriptor)]; + u8 tbuf [sizeof (struct usb_hub_descriptor)] + __attribute__((aligned(4))); const u8 *bufp = tbuf; int len = 0; int patch_wakeup = 0;