aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mod_devicetable.h
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2013-07-05 11:43:56 -0400
committerJohn W. Linville <linville@tuxdriver.com>2013-07-18 16:21:59 -0400
commitb01a60be7a4a161ac0a11df30569d21a20795aef (patch)
tree0f43f0b64f860b342e5c7d9bb241fb5fabe59e6b /include/linux/mod_devicetable.h
parent9494849e53e74048ee14d512feade01db402eef7 (diff)
ssb: fix alignment of struct bcma_device_id
The ARM OABI and EABI disagree on the alignment of structures with small members, so module init tools may interpret the ssb device table incorrectly, as shown by this warning when building the b43 device driver in an OABI kernel: FATAL: drivers/net/wireless/b43/b43: sizeof(struct ssb_device_id)=6 is not a modulo of the size of section __mod_ssb_device_table=88. Forcing the default (EABI) alignment on the structure makes this problem go away. Since the ssb_device_id may have the same problem, better fix both structures. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Russell King <linux@arm.linux.org.uk> Cc: John W. Linville <linville@tuxdriver.com> Cc: Michael Buesch <mb@bu3sch.de> Cc: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include/linux/mod_devicetable.h')
-rw-r--r--include/linux/mod_devicetable.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
index b62d4af6c667..45e921401b06 100644
--- a/include/linux/mod_devicetable.h
+++ b/include/linux/mod_devicetable.h
@@ -361,7 +361,8 @@ struct ssb_device_id {
361 __u16 vendor; 361 __u16 vendor;
362 __u16 coreid; 362 __u16 coreid;
363 __u8 revision; 363 __u8 revision;
364}; 364 __u8 __pad;
365} __attribute__((packed, aligned(2)));
365#define SSB_DEVICE(_vendor, _coreid, _revision) \ 366#define SSB_DEVICE(_vendor, _coreid, _revision) \
366 { .vendor = _vendor, .coreid = _coreid, .revision = _revision, } 367 { .vendor = _vendor, .coreid = _coreid, .revision = _revision, }
367#define SSB_DEVTABLE_END \ 368#define SSB_DEVTABLE_END \
@@ -377,7 +378,7 @@ struct bcma_device_id {
377 __u16 id; 378 __u16 id;
378 __u8 rev; 379 __u8 rev;
379 __u8 class; 380 __u8 class;
380}; 381} __attribute__((packed,aligned(2)));
381#define BCMA_CORE(_manuf, _id, _rev, _class) \ 382#define BCMA_CORE(_manuf, _id, _rev, _class) \
382 { .manuf = _manuf, .id = _id, .rev = _rev, .class = _class, } 383 { .manuf = _manuf, .id = _id, .rev = _rev, .class = _class, }
383#define BCMA_CORETABLE_END \ 384#define BCMA_CORETABLE_END \