]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
ASoC: loongson: Fix build warning when !CONFIG_PCI
authorBinbin Zhou <zhoubinbin@loongson.cn>
Sat, 12 Oct 2024 09:58:40 +0000 (17:58 +0800)
committerMark Brown <broonie@kernel.org>
Sat, 12 Oct 2024 10:23:56 +0000 (11:23 +0100)
Fixes the below if kernel config disable PCI support:

sound/soc/loongson/loongson_i2s_pci.c:157:1: warning: data definition has no type or storage class
     157 | module_pci_driver(loongson_i2s_driver);
         | ^~~~~~~~~~~~~~~~~
sound/soc/loongson/loongson_i2s_pci.c:157:1: error: type defaults to 'int' in declaration of 'module_pci_driver' [-Wimplicit-int]
sound/soc/loongson/loongson_i2s_pci.c:157:1: error: parameter names (without types) in function declaration [-Wdeclaration-missing-parameter-type]
sound/soc/loongson/loongson_i2s_pci.c:149:26: warning: 'loongson_i2s_driver' defined but not used [-Wunused-variable]
     149 | static struct pci_driver loongson_i2s_driver = {
         |                          ^~~~~~~~~~~~~~~~~~~

Add the appropriate Kconfig dependency.

Fixes: ba4c5fad598c ("ASoC: loongson: Add I2S controller driver as platform device")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202410101647.o1lI37ou-lkp@intel.com/
Closes: https://lore.kernel.org/oe-kbuild-all/202410101439.Tfn5aT6i-lkp@intel.com/
Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
Link: https://patch.msgid.link/20241012095840.965087-1-zhoubinbin@loongson.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/loongson/Kconfig

index e641ae4156d9a37701926df183eaf487c7ac72cf..2d8291c1443ccdfc44c2dfcf53ffe2f575edb614 100644 (file)
@@ -16,6 +16,7 @@ config SND_SOC_LOONGSON_CARD
 config SND_SOC_LOONGSON_I2S_PCI
        tristate "Loongson I2S-PCI Device Driver"
        depends on LOONGARCH || COMPILE_TEST
+       depends on PCI
        select REGMAP_MMIO
        help
          Say Y or M if you want to add support for I2S driver for