compat: add lower_32_bits
authorHauke Mehrtens <hauke@hauke-m.de>
Wed, 21 Sep 2011 17:04:24 +0000 (19:04 +0200)
committerLuis R. Rodriguez <mcgrof@qca.qualcomm.com>
Wed, 21 Sep 2011 23:02:44 +0000 (16:02 -0700)
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
include/linux/compat-2.6.27.h

index ed2035cc3e8cd20a4f2b829fad4a567cbb1a5d63..22fadcd24df3cbc28240e8f4c5a0e581c979ddf9 100644 (file)
@@ -250,6 +250,12 @@ static inline __u32 ethtool_cmd_speed(const struct ethtool_cmd *ep)
        return ep->speed;
 }
 
+/**
+ * lower_32_bits - return bits 0-31 of a number
+ * @n: the number we're accessing
+ */
+#define lower_32_bits(n) ((u32)(n))
+
 #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)) */
 
 #endif /* LINUX_26_27_COMPAT_H */