aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern A. Zeeb <bz@FreeBSD.org>2023-05-20 00:53:21 +0000
committerBjoern A. Zeeb <bz@FreeBSD.org>2023-06-08 18:07:28 +0000
commit4cbd427788ec625f17c1ecdfccbb7b06c1c908d9 (patch)
tree10c03d6d40d8402dcb4152e65c35c9110a071b34
parent17bde9cbc6fc3ac219aa11243c0b75025786f628 (diff)
downloadsrc-4cbd427788ec625f17c1ecdfccbb7b06c1c908d9.tar.gz
src-4cbd427788ec625f17c1ecdfccbb7b06c1c908d9.zip
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
-rw-r--r--sys/compat/linuxkpi/common/include/linux/io.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/compat/linuxkpi/common/include/linux/io.h b/sys/compat/linuxkpi/common/include/linux/io.h
index 598ff8e0376d..4690653cfc8c 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)