summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/io-mapping.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/include/linux/io-mapping.h b/include/linux/io-mapping.h
index f1ed66c4378..cbc2f0cd631 100644
--- a/include/linux/io-mapping.h
+++ b/include/linux/io-mapping.h
@@ -49,9 +49,8 @@ static inline struct io_mapping *
io_mapping_create_wc(resource_size_t base, unsigned long size)
{
struct io_mapping *iomap;
- pgprot_t prot;
- if (!reserve_io_memtype_wc(base, size, &prot))
+ if (!is_io_mapping_possible(base, size))
return NULL;
iomap = kmalloc(sizeof(*iomap), GFP_KERNEL);
@@ -60,14 +59,13 @@ io_mapping_create_wc(resource_size_t base, unsigned long size)
iomap->base = base;
iomap->size = size;
- iomap->prot = prot;
+ iomap->prot = pgprot_writecombine(__pgprot(__PAGE_KERNEL));
return iomap;
}
static inline void
io_mapping_free(struct io_mapping *mapping)
{
- free_io_memtype(mapping->base, mapping->size);
kfree(mapping);
}