diff mbox

[v3,1/5] ARM: remove duplicates in mach-* and plat-*

Message ID 20130814221237.089710222@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Domenico Andreoli Aug. 14, 2013, 10:10 p.m. UTC
From: Domenico Andreoli <domenico.andreoli@linux.com>

This to allow multiple machine/platform options to select the same
mach-/plat- subdir without triggering linking errors.

Ex. Makefile:

machine-$(CONFIG_ARCH_BCM)        += bcm
machine-$(CONFIG_ARCH_BCM4760)    += bcm

Taken from Russel's email:
http://permalink.gmane.org/gmane.linux.ports.arm.kernel/255431

Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Domenico Andreoli <domenico.andreoli@linux.com>
---
 arch/arm/Makefile |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

Index: b/arch/arm/Makefile
===================================================================
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -238,8 +238,8 @@  ifeq ($(CONFIG_ARCH_MULTIPLATFORM),y)
 MACHINE  :=
 endif
 
-machdirs := $(patsubst %,arch/arm/mach-%/,$(machine-y))
-platdirs := $(patsubst %,arch/arm/plat-%/,$(plat-y))
+machdirs := $(patsubst %,arch/arm/mach-%/,$(sort $(machine-y)))
+platdirs := $(patsubst %,arch/arm/plat-%/,$(sort $(plat-y)))
 
 ifneq ($(CONFIG_ARCH_MULTIPLATFORM),y)
 ifeq ($(KBUILD_SRC),)