fix unaligned exception in /drivers/net/wireless/orinoco.c
authorHennerich, Michael <Michael.Hennerich@analog.com>
Tue, 6 Feb 2007 00:41:35 +0000 (16:41 -0800)
committerJeff Garzik <jeff@garzik.org>
Wed, 7 Feb 2007 23:49:57 +0000 (18:49 -0500)
Prevent an unaligned exception to occur.  (GCC 4.1) tmp is defined as char
pointer while it is later accessed as short.

Cc: Jean Tourrilhes <jt@hpl.hp.com>
Cc: John W. Linville <linville@tuxdriver.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/wireless/orinoco.c

index 936c888e03e15aa44352285ea3c952a15ea587e0..2a65bb93de26f6b1e87b0af1aba5d6d349e0121f 100644 (file)
@@ -2059,7 +2059,7 @@ static int determine_firmware(struct net_device *dev)
        int err;
        struct comp_id nic_id, sta_id;
        unsigned int firmver;
-       char tmp[SYMBOL_MAX_VER_LEN+1];
+       char tmp[SYMBOL_MAX_VER_LEN+1] __attribute__((aligned(2)));
 
        /* Get the hardware version */
        err = HERMES_READ_RECORD(hw, USER_BAP, HERMES_RID_NICID, &nic_id);