]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
ASoC: qdsp6: add ifdef CONFIG_OF around of_device_id
authorSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Fri, 25 Sep 2020 16:35:51 +0000 (17:35 +0100)
committerMark Brown <broonie@kernel.org>
Fri, 25 Sep 2020 17:36:58 +0000 (18:36 +0100)
Add ifdef CONFIG_OF around of_device_id table to fix below
W=1 compile test warning with !CONFIG_OF:

sound/soc/qcom/qdsp6/q6afe-clocks.c:254:34: warning: unused variable
 'q6afe_clock_device_id' [-Wunused-const-variable]

Fix this warning for across all qdsp6 drivers.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20200925163552.20717-2-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/qcom/qdsp6/q6adm.c
sound/soc/qcom/qdsp6/q6afe-clocks.c
sound/soc/qcom/qdsp6/q6afe-dai.c
sound/soc/qcom/qdsp6/q6afe.c
sound/soc/qcom/qdsp6/q6asm-dai.c
sound/soc/qcom/qdsp6/q6asm.c
sound/soc/qcom/qdsp6/q6core.c
sound/soc/qcom/qdsp6/q6routing.c

index 2f3ea6beb066a58377a5d463559fe000ccaaf4ca..72f29720398cd622c9a7d872a02eaa3fc56aa787 100644 (file)
@@ -611,11 +611,13 @@ static int q6adm_remove(struct apr_device *adev)
        return 0;
 }
 
+#ifdef CONFIG_OF
 static const struct of_device_id q6adm_device_id[]  = {
        { .compatible = "qcom,q6adm" },
        {},
 };
 MODULE_DEVICE_TABLE(of, q6adm_device_id);
+#endif
 
 static struct apr_driver qcom_q6adm_driver = {
        .probe = q6adm_probe,
index 2967f4546af5127c9a57a1c179f3eb1428f42e0d..25b409597d51ebdda61f93b2774dbc52c09f0060 100644 (file)
@@ -251,11 +251,13 @@ static int q6afe_clock_dev_probe(struct platform_device *pdev)
        return 0;
 }
 
+#ifdef CONFIG_OF
 static const struct of_device_id q6afe_clock_device_id[] = {
        { .compatible = "qcom,q6afe-clocks" },
        {},
 };
 MODULE_DEVICE_TABLE(of, q6afe_clock_device_id);
+#endif
 
 static struct platform_driver q6afe_clock_platform_driver = {
        .driver = {
index d58b86a981148935a0b8f78a09f11222ffe8a18c..4e1f101281e7db4779890f7e7ffc3f72699f5aa7 100644 (file)
@@ -1689,11 +1689,13 @@ static int q6afe_dai_dev_probe(struct platform_device *pdev)
                                          q6afe_dais, ARRAY_SIZE(q6afe_dais));
 }
 
+#ifdef CONFIG_OF
 static const struct of_device_id q6afe_dai_device_id[] = {
        { .compatible = "qcom,q6afe-dais" },
        {},
 };
 MODULE_DEVICE_TABLE(of, q6afe_dai_device_id);
+#endif
 
 static struct platform_driver q6afe_dai_platform_driver = {
        .driver = {
index 688878a002a4d6a616bd6e03a09fac8f15bf27d1..0ca1e4aae51848bead4a25219ebcfa4b7e0450f4 100644 (file)
@@ -1750,11 +1750,13 @@ static int q6afe_remove(struct apr_device *adev)
        return 0;
 }
 
+#ifdef CONFIG_OF
 static const struct of_device_id q6afe_device_id[]  = {
        { .compatible = "qcom,q6afe" },
        {},
 };
 MODULE_DEVICE_TABLE(of, q6afe_device_id);
+#endif
 
 static struct apr_driver qcom_q6afe_driver = {
        .probe = q6afe_probe,
index a1dd31f306cec3fec38b532a0e7b7b1edf0f5ace..c9ac9c1d26c4757619aa044efa2042c5667388cf 100644 (file)
@@ -1334,11 +1334,13 @@ static int q6asm_dai_probe(struct platform_device *pdev)
                                               pdata->dais, pdata->num_dais);
 }
 
+#ifdef CONFIG_OF
 static const struct of_device_id q6asm_dai_device_id[] = {
        { .compatible = "qcom,q6asm-dais" },
        {},
 };
 MODULE_DEVICE_TABLE(of, q6asm_dai_device_id);
+#endif
 
 static struct platform_driver q6asm_dai_platform_driver = {
        .driver = {
index d745a02fcd5f7d97e7263d5816f338d4f2a628dd..790abc135223fbf300b7479b1e1974f1429aff2d 100644 (file)
@@ -1733,11 +1733,14 @@ static int q6asm_remove(struct apr_device *adev)
 
        return 0;
 }
+
+#ifdef CONFIG_OF
 static const struct of_device_id q6asm_device_id[]  = {
        { .compatible = "qcom,q6asm" },
        {},
 };
 MODULE_DEVICE_TABLE(of, q6asm_device_id);
+#endif
 
 static struct apr_driver qcom_q6asm_driver = {
        .probe = q6asm_probe,
index ae314a652efead1ad08274a3102a07d3cbc73729..5358fefd4210bc074cf2a9ad1ef82a42e6f8e17a 100644 (file)
@@ -354,11 +354,13 @@ static int q6core_exit(struct apr_device *adev)
        return 0;
 }
 
+#ifdef CONFIG_OF
 static const struct of_device_id q6core_device_id[]  = {
        { .compatible = "qcom,q6core" },
        {},
 };
 MODULE_DEVICE_TABLE(of, q6core_device_id);
+#endif
 
 static struct apr_driver qcom_q6core_driver = {
        .probe = q6core_probe,
index b12539fae6ed90f9e2d35ad130513c39352f5fca..53185e26fea1702fc9fc08e88fe7e38a87327d3f 100644 (file)
@@ -1143,11 +1143,13 @@ static int q6pcm_routing_remove(struct platform_device *pdev)
        return 0;
 }
 
+#ifdef CONFIG_OF
 static const struct of_device_id q6pcm_routing_device_id[] = {
        { .compatible = "qcom,q6adm-routing" },
        {},
 };
 MODULE_DEVICE_TABLE(of, q6pcm_routing_device_id);
+#endif
 
 static struct platform_driver q6pcm_routing_platform_driver = {
        .driver = {