From 4cbd427788ec625f17c1ecdfccbb7b06c1c908d9 Mon Sep 17 00:00:00 2001 From: "Bjoern A. Zeeb" Date: Sat, 20 May 2023 00:53:21 +0000 Subject: [PATCH] LinuxKPI: add devm_ioremap() Given we do not seem to support ioremap() do not support the "devm" version either and simply return NULL, which means we do not have to keep track of the memory to be freed on device free later. Sponsored by: The FreeBSD Foundation MFC after: 10 days Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D40173 --- sys/compat/linuxkpi/common/include/linux/io.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/io.h b/sys/compat/linuxkpi/common/include/linux/io.h index 598ff8e0376..4690653cfc8 100644 --- a/sys/compat/linuxkpi/common/include/linux/io.h +++ b/sys/compat/linuxkpi/common/include/linux/io.h @@ -403,6 +403,13 @@ _ioremap_attr(vm_paddr_t _phys_addr, unsigned long _size, int _attr) } #endif +struct device; +static inline void * +devm_ioremap(struct device *dev, resource_size_t offset, resource_size_t size) +{ + return (NULL); +} + #ifdef VM_MEMATTR_DEVICE #define ioremap_nocache(addr, size) \ _ioremap_attr((addr), (size), VM_MEMATTR_DEVICE)