From fd5c16870169bb76dd3d3bcfbcc6a112f74aeefe Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Fri, 11 Jan 2019 18:05:11 +0100 Subject: kernel: Build: Split kmod-regmap This reduces the needed modifications to the mainline Linux kernel and also makes the regmap package work with an out of tree kernel which does not have these modifications. The regmap-core is only added when it is really build as a module. The regmap-core is normally bool so it cannot be built as a module in an unmodified kernel. When it is selected by on other kernel module it will always be selected as build in and it also does not show up in $(LINUX_DIR)/modules.builtin as it is not supposed to be a kernel module. When it is not in $(LINUX_DIR)/modules.builtin the build system expects it to be built as a .ko file. Just check if the module is really there and only add it in that case. This splits the regmap package into multiple packages, one for each bus type. This way only the bus maps which are really needed have to be added. This also splits the I2C, SPI and MMIO regmap into separate packages to not require all these subsystems to build them, on an unmodified upstream kernel this also causes problems in some situations. Signed-off-by: Hauke Mehrtens --- package/kernel/linux/modules/sound.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'package/kernel/linux/modules/sound.mk') diff --git a/package/kernel/linux/modules/sound.mk b/package/kernel/linux/modules/sound.mk index 177140e0fc..bf4bd5d7c0 100644 --- a/package/kernel/linux/modules/sound.mk +++ b/package/kernel/linux/modules/sound.mk @@ -188,7 +188,7 @@ $(eval $(call KernelPackage,sound-via82xx)) define KernelPackage/sound-soc-core TITLE:=SoC sound support - DEPENDS:=+kmod-regmap +kmod-ac97 + DEPENDS:=+kmod-regmap-core +kmod-ac97 KCONFIG:= \ CONFIG_SND_SOC \ CONFIG_SND_SOC_DMAENGINE_PCM=y \ @@ -321,7 +321,7 @@ define KernelPackage/sound-hda-core $(LINUX_DIR)/sound/pci/hda/snd-hda-codec.ko \ $(LINUX_DIR)/sound/pci/hda/snd-hda-codec-generic.ko AUTOLOAD:=$(call AutoProbe,snd-hda-core@ge4.1 snd-hda-codec snd-hda-codec-generic) - $(call AddDepends/sound,+kmod-regmap) + $(call AddDepends/sound,+kmod-regmap-core) endef define KernelPackage/sound-hda-core/description -- cgit v1.2.3