devm_kmalloc() was added in kernel 3.13. To backport it we replace the
calls with devm_kzalloc() instead.

Signed-off-by: Hauke Mehrtens <[email protected]>
---
 backport/backport-include/linux/device.h |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/backport/backport-include/linux/device.h 
b/backport/backport-include/linux/device.h
index fa269d2..5eda359 100644
--- a/backport/backport-include/linux/device.h
+++ b/backport/backport-include/linux/device.h
@@ -229,4 +229,8 @@ static inline void *dev_get_platdata(const struct device 
*dev)
 }
 #endif
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,13,0)
+#define devm_kmalloc(dev, size, flags) devm_kzalloc(dev, size, flags) 
+#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

Reply via email to