octeon: only build flash_setup code when CONFIG_MTD is set
PATCH 2/2 octeon: only build flash_setup code when CONFIG_MTD is set
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.
---
arch/mips/cavium-octeon/Makefile +2 -1
@@ -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
Quoted 3 lines · Florian Fainelli
This patch makes the
flash_setupcode be compiled only whenCONFIG_MTDis set, it does make sense to register a physmap platform driver without the MTD subsystem being enabled.
No. A user might build the MTD subsystem as a module and then insert it into a running system so the idea is to always register the devices. This also keeps the information in /proc/iomem rsp. /proc/iostat and sysfs more useful.
Ralf
Le Monday 22 June 2009 16:40:42 Ralf Baechle, vous avez écrit :
Quoted 9 lines · Florian Fainelli
Quoted 3 lines
This patch makes the
flash_setupcode be compiled only whenCONFIG_MTDis set, it does make sense to register a physmap platform driver without the MTD subsystem being enabled.No. A user might build the MTD subsystem as a module and then insert it into a running system so the idea is to always register the devices. This also keeps the information in
/proc/iomemrsp./proc/iostatand sysfs more useful.
Right.
Signature · 4 lines
Best regards, Florian Fainelli Email : [email protected] http://openwrt.org -------------------------------