USB: properly pad out usb_device_id.driver_info
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 18 Jun 2012 22:38:22 +0000 (15:38 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 18 Jun 2012 22:38:22 +0000 (15:38 -0700)
On some systems, struct usb_device_id doesn't align properly due to the
recent changes in it.  So pad out the driver_info field to align on a
boundry that systems can handle it.

Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/mod_devicetable.h

index 7771d453e5f3fb89463091f0b585e8c0be505637..6955045199b09c006bce030bf21b8b0bdb011d15 100644 (file)
@@ -122,7 +122,8 @@ struct usb_device_id {
        __u8            bInterfaceNumber;
 
        /* not matched against */
-       kernel_ulong_t  driver_info;
+       kernel_ulong_t  driver_info
+               __attribute__((aligned(sizeof(kernel_ulong_t))));
 };
 
 /* Some useful macros to use to create struct usb_device_id */