This patch makes the flash_setup code be compiled only when CONFIG_MTD is set, it does make sense to register a physmap platform driver without the MTD subsystem being enabled. CC: David Daney <ddaney@xxxxxxxxxxxxxxxxxx> Signed-off-by: Florian Fainelli <florian@xxxxxxxxxxx> --- diff --git a/arch/mips/cavium-octeon/Makefile b/arch/mips/cavium-octeon/Makefile index 7c0528b..f1b401b 100644 --- a/arch/mips/cavium-octeon/Makefile +++ b/arch/mips/cavium-octeon/Makefile @@ -10,9 +10,10 @@ # obj-y := setup.o serial.o octeon-irq.o csrc-octeon.o -obj-y += dma-octeon.o flash_setup.o +obj-y += dma-octeon.o obj-y += octeon-memcpy.o +obj-$(CONFIG_MTD) += flash_setup.o obj-$(CONFIG_SMP) += smp.o obj-$(CONFIG_PCI) += pci-common.o obj-$(CONFIG_PCI) += pci.o