diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-03-02 15:47:01 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-03-02 15:47:01 -0800 |
commit | 2d44947a56f7a567f2e9250dc458a6288d774f9c (patch) | |
tree | 9156958b53ef544b314c9af708f43a6e425dfc72 /include | |
parent | 359aa09be9b2b343e01306cb4a6f29d7159d7498 (diff) | |
parent | 5ce04e3de8c36ba37c56e94e3c4dc7973c7f546c (diff) |
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); } |