soundwire: qcom: use __maybe_unused for swrm_runtime_resume()
authorSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Thu, 3 Mar 2022 11:03:21 +0000 (11:03 +0000)
committerVinod Koul <vkoul@kernel.org>
Thu, 3 Mar 2022 15:51:54 +0000 (21:21 +0530)
swrm_runtime_resume() would not be defined when CONFIG_PM=n

This causes below build failure
drivers/soundwire/qcom.c:1460:12: error: 'swrm_runtime_resume' defined
but not used [-Werror=unused-function]

Mark the resume swrm_runtime_resume() with  __maybe_unused attribute.

Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220303110321.23666-1-srinivas.kandagatla@linaro.org
[redo commit title and log]
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/soundwire/qcom.c

index f613a41c278a9e3b65de2e306c3fdd8e60ae3cce..da1ad7ebb1aa7f0e7800dfa9504eb667a7edd6cf 100644 (file)
@@ -1457,7 +1457,7 @@ static bool swrm_wait_for_frame_gen_enabled(struct qcom_swrm_ctrl *swrm)
        return false;
 }
 
-static int swrm_runtime_resume(struct device *dev)
+static int __maybe_unused swrm_runtime_resume(struct device *dev)
 {
        struct qcom_swrm_ctrl *ctrl = dev_get_drvdata(dev);
        int ret;