From 986662b90352d79c4842dd7d4e678f50824ed729 Mon Sep 17 00:00:00 2001
From: Masahiro Yamada <yamada.masahiro@socionext.com>
Date: Sun, 11 Aug 2019 00:52:58 +0900
Subject: [PATCH] kbuild: refactor part-of-module more

Make it even shorter.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---
 scripts/Makefile.build | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index edf84ede803cf..c41206880bf26 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -98,8 +98,7 @@ endif
 # ---------------------------------------------------------------------------
 
 # Default is built-in, unless we know otherwise
-$(foreach x, i ll lst o s symtypes, $(patsubst %.o,%.$(x),$(real-obj-m))): \
-	part-of-module := y
+part-of-module = $(if $(filter $(basename $@).o, $(real-obj-m)),y)
 
 modkern_cflags =                                          \
 	$(if $(part-of-module),                           \
-- 
2.30.2