1 --- a/backport-include/linux/device.h
2 +++ b/backport-include/linux/device.h
3 @@ -177,4 +177,20 @@ static inline void *devm_kmalloc_array(s
7 +#if LINUX_VERSION_CODE < KERNEL_VERSION(3,15,0)
8 +#define devm_kmemdup LINUX_BACKPORT(devm_kmemdup)
9 +static inline void *devm_kmemdup(struct device *dev, const void *src,
10 + size_t len, gfp_t gfp)
14 + p = devm_kmalloc(dev, len, gfp);
16 + memcpy(p, src, len);
23 #endif /* __BACKPORT_DEVICE_H */