ASoC: ingenic: Unconditionally depend on devicetree
authorPaul Cercueil <paul@crapouillou.net>
Sat, 23 May 2020 12:54:55 +0000 (14:54 +0200)
committerMark Brown <broonie@kernel.org>
Thu, 28 May 2020 12:20:17 +0000 (13:20 +0100)
All boards with Ingenic SoCs probe with devicetree already, we have no
use for a non-devicetree path.

This solves some compilation warnings that were caused by unused
variables in the case where CONFIG_OF was disabled.

Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Link: https://lore.kernel.org/r/20200523125455.12392-1-paul@crapouillou.net
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/Kconfig
sound/soc/codecs/jz4725b.c
sound/soc/codecs/jz4740.c
sound/soc/codecs/jz4770.c
sound/soc/jz4740/Kconfig
sound/soc/jz4740/jz4740-i2s.c

index 683e0a94fd459b56c38e9f572d54a952ac151b48..42538df2c454e01a8dcfc7a11f74798ba3a035d9 100644 (file)
@@ -682,6 +682,7 @@ config SND_SOC_CX2072X
 
 config SND_SOC_JZ4740_CODEC
        depends on MIPS || COMPILE_TEST
+       depends on OF
        select REGMAP_MMIO
        tristate "Ingenic JZ4740 internal CODEC"
        help
@@ -693,6 +694,7 @@ config SND_SOC_JZ4740_CODEC
 
 config SND_SOC_JZ4725B_CODEC
        depends on MIPS || COMPILE_TEST
+       depends on OF
        select REGMAP
        tristate "Ingenic JZ4725B internal CODEC"
        help
@@ -704,6 +706,7 @@ config SND_SOC_JZ4725B_CODEC
 
 config SND_SOC_JZ4770_CODEC
        depends on MIPS || COMPILE_TEST
+       depends on OF
        select REGMAP
        tristate "Ingenic JZ4770 internal CODEC"
        help
index 2567a5d15b554a1774789749e8c8b5681be19041..e49374c72e70a148c7e36b99fd6aad8aeab94b9f 100644 (file)
@@ -574,19 +574,17 @@ static int jz4725b_codec_probe(struct platform_device *pdev)
        return ret;
 }
 
-#ifdef CONFIG_OF
 static const struct of_device_id jz4725b_codec_of_matches[] = {
        { .compatible = "ingenic,jz4725b-codec", },
        { }
 };
 MODULE_DEVICE_TABLE(of, jz4725b_codec_of_matches);
-#endif
 
 static struct platform_driver jz4725b_codec_driver = {
        .probe = jz4725b_codec_probe,
        .driver = {
                .name = "jz4725b-codec",
-               .of_match_table = of_match_ptr(jz4725b_codec_of_matches),
+               .of_match_table = jz4725b_codec_of_matches,
        },
 };
 module_platform_driver(jz4725b_codec_driver);
index 460aa1fd1efe74c122264d55d1b0986c622afc71..c9900d1cd5c2107295d88791ede6e419b784c02e 100644 (file)
@@ -344,19 +344,17 @@ static int jz4740_codec_probe(struct platform_device *pdev)
        return ret;
 }
 
-#ifdef CONFIG_OF
 static const struct of_device_id jz4740_codec_of_matches[] = {
        { .compatible = "ingenic,jz4740-codec", },
        { }
 };
 MODULE_DEVICE_TABLE(of, jz4740_codec_of_matches);
-#endif
 
 static struct platform_driver jz4740_codec_driver = {
        .probe = jz4740_codec_probe,
        .driver = {
                .name = "jz4740-codec",
-               .of_match_table = of_match_ptr(jz4740_codec_of_matches),
+               .of_match_table = jz4740_codec_of_matches,
        },
 };
 
index e7cf2c10760775aa514c17c59f2a0a4d61c0d5fc..34775aa624024855a8ef66e90f85c5056e37785f 100644 (file)
@@ -937,7 +937,7 @@ static struct platform_driver jz4770_codec_driver = {
        .probe                  = jz4770_codec_probe,
        .driver                 = {
                .name           = "jz4770-codec",
-               .of_match_table = of_match_ptr(jz4770_codec_of_matches),
+               .of_match_table = jz4770_codec_of_matches,
        },
 };
 module_platform_driver(jz4770_codec_driver);
index e72f826062e9623f17ef8269968849a0665edc41..29144720cb622c5e0a187a0b0cd5e3d0cec997ae 100644 (file)
@@ -2,7 +2,7 @@
 config SND_JZ4740_SOC_I2S
        tristate "SoC Audio (I2S protocol) for Ingenic JZ4740 SoC"
        depends on MIPS || COMPILE_TEST
-       depends on HAS_IOMEM
+       depends on OF && HAS_IOMEM
        select SND_SOC_GENERIC_DMAENGINE_PCM
        help
          Say Y if you want to use I2S protocol and I2S codec on Ingenic JZ4740
index 403630b121f6fc797359885305b59980a1fd5620..c7bd20104b204747613d42c97117404012ebe643 100644 (file)
@@ -504,7 +504,6 @@ static const struct snd_soc_component_driver jz4740_i2s_component = {
        .resume         = jz4740_i2s_resume,
 };
 
-#ifdef CONFIG_OF
 static const struct of_device_id jz4740_of_matches[] = {
        { .compatible = "ingenic,jz4740-i2s", .data = &jz4740_i2s_soc_info },
        { .compatible = "ingenic,jz4760-i2s", .data = &jz4760_i2s_soc_info },
@@ -513,7 +512,6 @@ static const struct of_device_id jz4740_of_matches[] = {
        { /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(of, jz4740_of_matches);
-#endif
 
 static int jz4740_i2s_dev_probe(struct platform_device *pdev)
 {
@@ -558,7 +556,7 @@ static struct platform_driver jz4740_i2s_driver = {
        .probe = jz4740_i2s_dev_probe,
        .driver = {
                .name = "jz4740-i2s",
-               .of_match_table = of_match_ptr(jz4740_of_matches)
+               .of_match_table = jz4740_of_matches,
        },
 };