Skip to contentSkip to conversation

octeon: only build flash_setup code when CONFIG_MTD is set

PATCH In review Florian Fainelli 2 participants 3 messages Jun 22, 2009 MIPS

lore
Share & tools
lore
#0 lore raw

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
index 7c0528b..f1b401b 100644
@@ -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
#1 lore raw
Quoted 3 lines · Florian Fainelli

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.

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

#2 lore raw

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_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.

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.

Right.

Signature · 4 lines
Best regards, Florian Fainelli
Email : [email protected]
http://openwrt.org
-------------------------------