ARM: 8676/1: NOMMU: provide pgprot_device() macro
authorVladimir Murzin <vladimir.murzin@arm.com>
Wed, 24 May 2017 09:30:18 +0000 (10:30 +0100)
committerRussell King <rmk+kernel@armlinux.org.uk>
Mon, 5 Jun 2017 09:29:40 +0000 (10:29 +0100)
commit7ef4783e19a84fe1e8b58f4c27b858dfdcaef207
tree78e90d39390e97bef1289b350f572c78bdc59a1e
parent29226b198bb26f8e23985d011a9301cee5550da8
ARM: 8676/1: NOMMU: provide pgprot_device() macro

NOMMU build leads to the following error:

  CC      drivers/pci/mmap.o
drivers/pci/mmap.c: In function 'pci_mmap_resource_range':
drivers/pci/mmap.c:60:3: error: implicit declaration of function 'pgprot_device' [-Werror=implicit-function-declaration]
   vma->vm_page_prot = pgprot_device(vma->vm_page_prot);
   ^

cc1: some warnings being treated as errors
scripts/Makefile.build:302: recipe for target 'drivers/pci/mmap.o' failed
make[2]: *** [drivers/pci/mmap.o] Error 1
scripts/Makefile.build:561: recipe for target 'drivers/pci' failed
make[1]: *** [drivers/pci] Error 2
Makefile:1016: recipe for target 'drivers' failed
make: *** [drivers] Error 2

Fix it with support of pgprot_device() macro for NOMMU.

Fixes: 00d2904ffeac ("ARM/PCI: Use generic pci_mmap_resource_range()")
Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
arch/arm/include/asm/pgtable-nommu.h