From: Hauke Mehrtens Date: Wed, 1 Jan 2014 18:03:52 +0000 (+0100) Subject: backports: add devm_kmalloc() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=b664d51b8355aebc58db69973ac7189e1b5d6c39;p=openwrt%2Fstaging%2Fblogic.git backports: add devm_kmalloc() devm_kmalloc() was added in kernel 3.13. To backport it we replace the calls with devm_kzalloc() instead. Signed-off-by: Hauke Mehrtens --- diff --git a/backport/backport-include/linux/device.h b/backport/backport-include/linux/device.h index fa269d2226ca..5eda359f2639 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 */