summaryrefslogtreecommitdiffstats
path: root/include/linux/io-mapping.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/io-mapping.h')
-rw-r--r--include/linux/io-mapping.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/io-mapping.h b/include/linux/io-mapping.h
index f1ed66c..c1b4830 100644
--- a/include/linux/io-mapping.h
+++ b/include/linux/io-mapping.h
@@ -93,8 +93,11 @@ io_mapping_unmap_atomic(void *vaddr)
static inline void *
io_mapping_map_wc(struct io_mapping *mapping, unsigned long offset)
{
+ resource_size_t phys_addr;
+
BUG_ON(offset >= mapping->size);
- resource_size_t phys_addr = mapping->base + offset;
+ phys_addr = mapping->base + offset;
+
return ioremap_wc(phys_addr, PAGE_SIZE);
}
OpenPOWER on IntegriCloud