diff options
| author | Bjoern A. Zeeb <bz@FreeBSD.org> | 2026-04-14 13:35:36 +0000 |
|---|---|---|
| committer | Bjoern A. Zeeb <bz@FreeBSD.org> | 2026-04-18 01:12:14 +0000 |
| commit | f1834d03af617a93993056bb902082452673f89f (patch) | |
| tree | 602dec3111180a89a0e75b96945299e76b0086b9 /sys/compat/linuxkpi/common/include/linux | |
| parent | c72ac6af086962d236f4712761abacac0c62b48e (diff) | |
Diffstat (limited to 'sys/compat/linuxkpi/common/include/linux')
| -rw-r--r-- | sys/compat/linuxkpi/common/include/linux/device.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/compat/linuxkpi/common/include/linux/device.h b/sys/compat/linuxkpi/common/include/linux/device.h index 8834f1799e61..030e9b127540 100644 --- a/sys/compat/linuxkpi/common/include/linux/device.h +++ b/sys/compat/linuxkpi/common/include/linux/device.h @@ -701,6 +701,13 @@ devm_kmemdup(struct device *dev, const void *src, size_t len, gfp_t gfp) return (dst); } +static inline void * +devm_kmemdup_array(struct device *dev, const void *src, size_t n, size_t len, + gfp_t gfp) +{ + return (devm_kmemdup(dev, src, size_mul(n, len), gfp)); +} + #define devm_kzalloc(_dev, _size, _gfp) \ devm_kmalloc((_dev), (_size), (_gfp) | __GFP_ZERO) |
