ASoC: qcom: mark OF related data as maybe unused
authorKrzysztof Kozlowski <krzk@kernel.org>
Wed, 25 Nov 2020 16:44:22 +0000 (17:44 +0100)
committerMark Brown <broonie@kernel.org>
Thu, 26 Nov 2020 13:07:06 +0000 (13:07 +0000)
The driver can be compile tested with !CONFIG_OF making certain data
unused:

  sound/soc/qcom/lpass-apq8016.c:294:34: warning: ‘apq8016_lpass_cpu_device_id’ defined but not used [-Wunused-const-variable=]

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20201125164452.89239-10-krzk@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/qcom/apq8016_sbc.c
sound/soc/qcom/lpass-apq8016.c
sound/soc/qcom/lpass-ipq806x.c
sound/soc/qcom/lpass-sc7180.c

index 575e2aefefe3d4a4fd75dfe67f8402dbe24fab5d..270986b2f1025cfbb857ab55ab8bd01907f6d80f 100644 (file)
@@ -167,7 +167,7 @@ static int apq8016_sbc_platform_probe(struct platform_device *pdev)
        return devm_snd_soc_register_card(&pdev->dev, card);
 }
 
-static const struct of_device_id apq8016_sbc_device_id[]  = {
+static const struct of_device_id apq8016_sbc_device_id[] __maybe_unused = {
        { .compatible = "qcom,apq8016-sbc-sndcard" },
        {},
 };
index 0aedb3a0a798a8af6616b8f67581c30321bf7016..8507ef8f6679b69b2d625efb6dce6099399f41ce 100644 (file)
@@ -291,7 +291,7 @@ static struct lpass_variant apq8016_data = {
        .free_dma_channel       = apq8016_lpass_free_dma_channel,
 };
 
-static const struct of_device_id apq8016_lpass_cpu_device_id[] = {
+static const struct of_device_id apq8016_lpass_cpu_device_id[] __maybe_unused = {
        { .compatible = "qcom,lpass-cpu-apq8016", .data = &apq8016_data },
        {}
 };
index 832a9161484e7f7f3328c83e1f188bde55c56c82..92f98b4df47ffb23b878108342c8c8c3c785c427 100644 (file)
@@ -161,7 +161,7 @@ static struct lpass_variant ipq806x_data = {
        .free_dma_channel       = ipq806x_lpass_free_dma_channel,
 };
 
-static const struct of_device_id ipq806x_lpass_cpu_device_id[] = {
+static const struct of_device_id ipq806x_lpass_cpu_device_id[] __maybe_unused = {
        { .compatible = "qcom,lpass-cpu", .data = &ipq806x_data },
        {}
 };
index 238069e293bf0c3f4d4a613d45dc4d3a5e209ee6..145d1000a527704316293204a9e2a6665824f579 100644 (file)
@@ -285,7 +285,7 @@ static struct lpass_variant sc7180_data = {
        .free_dma_channel       = sc7180_lpass_free_dma_channel,
 };
 
-static const struct of_device_id sc7180_lpass_cpu_device_id[] = {
+static const struct of_device_id sc7180_lpass_cpu_device_id[] __maybe_unused = {
        {.compatible = "qcom,sc7180-lpass-cpu", .data = &sc7180_data},
        {}
 };