]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] pcmcia: fix cross-platform issues with pcmcia module aliases
authorKars de Jong <jongk@linux-m68k.org>
Sun, 25 Sep 2005 12:39:46 +0000 (14:39 +0200)
committerDominik Brodowski <linux@dominikbrodowski.net>
Mon, 26 Sep 2005 11:13:58 +0000 (13:13 +0200)
- Added a missing TO_NATIVE call to scripts/mod/file2alias.c:do_pcmcia_entry()
- Add an alignment attribute to struct pcmcia_device_no to solve an alignment
  issue seen when cross-compiling on x86 for m68k.

Signed-off-by: Kars de Jong <jongk@linux-m68k.org>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
include/linux/mod_devicetable.h
scripts/mod/file2alias.c

index 47da39ba3f0377f378556150daed3d5530a49849..4ed2107bc020f68e257e46d318e402b4bfecf4de 100644 (file)
@@ -209,10 +209,11 @@ struct pcmcia_device_id {
        /* for real multi-function devices */
        __u8            function;
 
-       /* for pseude multi-function devices */
+       /* for pseudo multi-function devices */
        __u8            device_no;
 
-       __u32           prod_id_hash[4];
+       __u32           prod_id_hash[4]
+               __attribute__((aligned(sizeof(__u32))));
 
        /* not matched against in kernelspace*/
 #ifdef __KERNEL__
index d8ee38aede26fee4cb8b78d8bd99467267c80da6..f2ee673329a7d509e945825820a8f2e75bcfefef 100644 (file)
@@ -295,11 +295,13 @@ static int do_pcmcia_entry(const char *filename,
 {
        unsigned int i;
 
+       id->match_flags = TO_NATIVE(id->match_flags);
        id->manf_id = TO_NATIVE(id->manf_id);
        id->card_id = TO_NATIVE(id->card_id);
        id->func_id = TO_NATIVE(id->func_id);
        id->function = TO_NATIVE(id->function);
        id->device_no = TO_NATIVE(id->device_no);
+
        for (i=0; i<4; i++) {
                id->prod_id_hash[i] = TO_NATIVE(id->prod_id_hash[i]);
        }