net: switchdev: use obj-$(CONFIG_NET_SWITCHDEV) form in net/Makefile

CONFIG_NET_SWITCHDEV is a bool option. Change the ifeq conditional to
the standard obj-$(CONFIG_NET_SWITCHDEV) form.

Use obj-y in net/switchdev/Makefile because Kbuild visits this Makefile
only when CONFIG_NET_SWITCHDEV=y.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Link: https://lore.kernel.org/r/20210125231659.106201-3-masahiroy@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Masahiro Yamada 2021-01-26 08:16:57 +09:00 committed by Jakub Kicinski
parent 1e328ed559
commit 0cfd99b487
2 changed files with 2 additions and 4 deletions

View File

@ -72,9 +72,7 @@ obj-$(CONFIG_VSOCKETS) += vmw_vsock/
obj-$(CONFIG_MPLS) += mpls/ obj-$(CONFIG_MPLS) += mpls/
obj-$(CONFIG_NET_NSH) += nsh/ obj-$(CONFIG_NET_NSH) += nsh/
obj-$(CONFIG_HSR) += hsr/ obj-$(CONFIG_HSR) += hsr/
ifneq ($(CONFIG_NET_SWITCHDEV),) obj-$(CONFIG_NET_SWITCHDEV) += switchdev/
obj-y += switchdev/
endif
ifneq ($(CONFIG_NET_L3_MASTER_DEV),) ifneq ($(CONFIG_NET_L3_MASTER_DEV),)
obj-y += l3mdev/ obj-y += l3mdev/
endif endif

View File

@ -3,4 +3,4 @@
# Makefile for the Switch device API # Makefile for the Switch device API
# #
obj-$(CONFIG_NET_SWITCHDEV) += switchdev.o obj-y += switchdev.o