[PATCH] mod_devicetable.h fixes

* ieee1394_device_id has kernel_ulong_t field after an odd number of
__u32 ones. Since mod_devicetable.h is included both from kernel and
from host build helper, we may be in trouble if we are building on
32bit host for 64bit target - userland sees unsigned long long,
kernel sees unsigned long and while their sizes match, alignments
might not. Fixed by forcing alignment. Fortunately, almost nobody
else needs that - the rest of such fields is naturally aligned as it
is.

* of_device_id has void * in it. Host userland helpers need
kernel_ulong_t instead, since their void * might have nothing to do
with the kernel one. Fixed in the same way it's done for similar
problems in pcmcia_device_id (ifdef __KERNEL__).

* pcmcia_device_id has the same problem as ieee1394_device_id. Fixed
the same way.

Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Al Viro and committed by
Linus Torvalds
9e2d3cd3 5bbe6ab9

+8 -2
+8 -2
include/linux/mod_devicetable.h
··· 33 33 __u32 model_id; 34 34 __u32 specifier_id; 35 35 __u32 version; 36 - kernel_ulong_t driver_data; 36 + kernel_ulong_t driver_data 37 + __attribute__((aligned(sizeof(kernel_ulong_t)))); 37 38 }; 38 39 39 40 ··· 183 182 char name[32]; 184 183 char type[32]; 185 184 char compatible[128]; 185 + #if __KERNEL__ 186 186 void *data; 187 + #else 188 + kernel_ulong_t data; 189 + #endif 187 190 }; 188 191 189 192 ··· 213 208 #ifdef __KERNEL__ 214 209 const char * prod_id[4]; 215 210 #else 216 - kernel_ulong_t prod_id[4]; 211 + kernel_ulong_t prod_id[4] 212 + __attribute__((aligned(sizeof(kernel_ulong_t)))); 217 213 #endif 218 214 219 215 /* not matched against */