summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPallipadi, Venkatesh <venkatesh.pallipadi@intel.com>2009-03-01 17:53:27 +0100
committerIngo Molnar <mingo@elte.hu>2009-03-02 09:43:32 +0100
commit5ce04e3de8c36ba37c56e94e3c4dc7973c7f546c (patch)
tree3a87dd2eeb07fe9fc5eaa10479a14cfbe9d07008 /include
parentx86: i915 needs pgprot_writecombine() and is_io_mapping_possible() (diff)
downloadlinux-5ce04e3de8c36ba37c56e94e3c4dc7973c7f546c.tar.xz
linux-5ce04e3de8c36ba37c56e94e3c4dc7973c7f546c.zip
fix warning in io_mapping_map_wc()
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include')
-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 cbc2f0cd631b..0adb0f91568c 100644
--- a/include/linux/io-mapping.h
+++ b/include/linux/io-mapping.h
@@ -91,8 +91,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);
}