This adds dev_get_platdata() function.
Signed-off-by: Hauke Mehrtens <[email protected]>
---
backport/backport-include/linux/device.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/backport/backport-include/linux/device.h
b/backport/backport-include/linux/device.h
index 2244c62..e659c0c 100644
--- a/backport/backport-include/linux/device.h
+++ b/backport/backport-include/linux/device.h
@@ -216,4 +216,12 @@ static inline void init_##_name##_attrs(void) {}
\
__ATTRIBUTE_GROUPS(_name)
#endif
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32)
+#define dev_get_platdata LINUX_BACKPORT(dev_get_platdata)
+static inline void *dev_get_platdata(const struct device *dev)
+{
+ return dev->platform_data;
+}
+#endif
+
#endif /* __BACKPORT_DEVICE_H */
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe backports" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html