diff options
| author | Jiri Kosina <jkosina@suse.cz> | 2018-10-23 13:19:54 +0200 |
|---|---|---|
| committer | Jiri Kosina <jkosina@suse.cz> | 2018-10-23 13:19:54 +0200 |
| commit | a600ffe6ec609b0600ec590236f97f8d430e0984 (patch) | |
| tree | 57432877c74c80ab470d7b655a2e18a6b5168ee5 /include/asm-generic | |
| parent | d19031d32cd77b2878a006040e0f8e4183ca59ef (diff) | |
| parent | 23e542e5ba5e4298a1475f94750317ec1662ba21 (diff) | |
Merge branch 'for-4.20/google' into for-linus
Whisker device specific fixes to hid-google driver
Diffstat (limited to 'include/asm-generic')
| -rw-r--r-- | include/asm-generic/io.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h index 66d1d45fa2e1..d356f802945a 100644 --- a/include/asm-generic/io.h +++ b/include/asm-generic/io.h @@ -1026,7 +1026,8 @@ static inline void __iomem *ioremap_wt(phys_addr_t offset, size_t size) #define ioport_map ioport_map static inline void __iomem *ioport_map(unsigned long port, unsigned int nr) { - return PCI_IOBASE + (port & MMIO_UPPER_LIMIT); + port &= IO_SPACE_LIMIT; + return (port > MMIO_UPPER_LIMIT) ? NULL : PCI_IOBASE + port; } #endif |
