]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
USB: Fix alignment of buffer passed down to ->hub_control()
authorMikael Pettersson <mikpe@it.uu.se>
Fri, 5 Jan 2007 23:54:18 +0000 (00:54 +0100)
committerAdrian Bunk <bunk@stusta.de>
Tue, 9 Jan 2007 02:23:30 +0000 (03:23 +0100)
Implementations assume the buffer is at least 4 byte aligned.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
drivers/usb/core/hcd.c

index 0018bbc4de3414bae4bd447e619b169239e593fc..9e82afc3389c9078b4aad89bd293cfd22d8c15d8 100644 (file)
@@ -344,7 +344,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;