carl9170 firmware: fix gcc alignment warnings
authorChristian Lamparter <chunkeey@googlemail.com>
Sun, 23 Jan 2011 21:01:05 +0000 (22:01 +0100)
committerChristian Lamparter <chunkeey@googlemail.com>
Sun, 23 Jan 2011 21:01:05 +0000 (22:01 +0100)
warning: cast increases required alignment of target type.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
include/linux/compiler.h

index f6f144449a78d8c3ff687d879f340b51bfe2dc08..d331f3c1fe043e15889f579f6830b47f99e4fbf0 100644 (file)
@@ -78,7 +78,7 @@
 
 #define container_of(ptr, type, member) ({                     \
        const typeof(((type *)0)->member) * __mptr = (ptr);     \
-       (type *)((char *)__mptr - offsetof(type, member)); })
+       (type *)(((unsigned long)__mptr - offsetof(type, member))); })
 
 #define MAX_ERRNO      4095