git: 4cbd427788ec - main - LinuxKPI: add devm_ioremap()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 08 Jun 2023 18:08:22 UTC
The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=4cbd427788ec625f17c1ecdfccbb7b06c1c908d9 commit 4cbd427788ec625f17c1ecdfccbb7b06c1c908d9 Author: Bjoern A. Zeeb <bz@FreeBSD.org> AuthorDate: 2023-05-20 00:53:21 +0000 Commit: Bjoern A. Zeeb <bz@FreeBSD.org> CommitDate: 2023-06-08 18:07:28 +0000 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 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)