diff options
| author | Jiri Kosina <[email protected]> | 2020-04-01 12:26:12 +0200 |
|---|---|---|
| committer | Jiri Kosina <[email protected]> | 2020-04-01 12:26:12 +0200 |
| commit | c9f289701540baeef9ac7c9977d67a7259f404db (patch) | |
| tree | ac3c29d41da02ac735c9a12da78905842fbccd2f /include/linux/io-mapping.h | |
| parent | 0aac6f9aaae5fba08963651d2ce49930145e118f (diff) | |
| parent | 910a7e89cec65efad254c947ce2bf8bf5b370962 (diff) | |
Merge branch 'for-5.7/appleir' into for-linus
- small code cleanups in hid-appleir from Lucas Tanure
Diffstat (limited to 'include/linux/io-mapping.h')
| -rw-r--r-- | include/linux/io-mapping.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/include/linux/io-mapping.h b/include/linux/io-mapping.h index 6e125e9b4187..837058bc1c9f 100644 --- a/include/linux/io-mapping.h +++ b/include/linux/io-mapping.h @@ -28,6 +28,7 @@ struct io_mapping { #ifdef CONFIG_HAVE_ATOMIC_IOMAP +#include <linux/pfn.h> #include <asm/iomap.h> /* * For small address space machines, mapping large objects @@ -64,12 +65,10 @@ io_mapping_map_atomic_wc(struct io_mapping *mapping, unsigned long offset) { resource_size_t phys_addr; - unsigned long pfn; BUG_ON(offset >= mapping->size); phys_addr = mapping->base + offset; - pfn = (unsigned long) (phys_addr >> PAGE_SHIFT); - return iomap_atomic_prot_pfn(pfn, mapping->prot); + return iomap_atomic_prot_pfn(PHYS_PFN(phys_addr), mapping->prot); } static inline void |