io-mapping: Fixup for different names of writecombine
[sfrench/cifs-2.6.git] / include / linux / io-mapping.h
index a87dd7fffc0af461d16d325b010903e89e237289..58df02bd93c9f04d0546a32de278503918d3e4f8 100644 (file)
@@ -123,7 +123,13 @@ io_mapping_init_wc(struct io_mapping *iomap,
        iomap->base = base;
        iomap->size = size;
        iomap->iomem = ioremap_wc(base, size);
+#if defined(pgprot_noncached_wc) /* archs can't agree on a name ... */
+       iomap->prot = pgprot_noncached_wc(PAGE_KERNEL);
+#elif defined(pgprot_writecombine)
        iomap->prot = pgprot_writecombine(PAGE_KERNEL);
+#else
+       iomap->prot = pgprot_noncached(PAGE_KERNEL);
+#endif
 
        return iomap;
 }