diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-03-03 00:47:01 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-03-03 00:47:01 +0100 |
commit | 2d44947a56f7a567f2e9250dc458a6288d774f9c (patch) | |
tree | 9156958b53ef544b314c9af708f43a6e425dfc72 /include | |
parent | Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 (diff) | |
parent | fix warning in io_mapping_map_wc() (diff) | |
download | linux-2d44947a56f7a567f2e9250dc458a6288d774f9c.tar.xz linux-2d44947a56f7a567f2e9250dc458a6288d774f9c.zip |
Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
fix warning in io_mapping_map_wc()
x86: i915 needs pgprot_writecombine() and is_io_mapping_possible()
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/io-mapping.h | 5 |
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); } |