[PATCH] drivers: soc: Fix mailbox suspend/resume no irq for IMX SCU

From: Vincenzo Frascino
Date: Mon Jul 06 2020 - 11:00:29 EST


imx_mu_suspend_noirq()/imx_mu_resume_noirq() are currently used only
when CONFIG_PM_SLEEP configuration options is enabled. Having it
disabled triggers the following warning at compile time:

drivers/mailbox/imx-mailbox.c:611:12: warning: âimx_mu_resume_noirqâ
defined but not used [-Wunused-function]
static int imx_mu_resume_noirq(struct device *dev)

drivers/mailbox/imx-mailbox.c:601:12: warning: âimx_mu_suspend_noirqâ
defined but not used [-Wunused-function]
static int imx_mu_suspend_noirq(struct device *dev)

Make imx_mu_suspend_noirq()/imx_mu_resume_noirq() __maybe_unused to
address the issue.

Cc: Jassi Brar <jassisinghbrar@xxxxxxxxx>
Cc: Shawn Guo <shawnguo@xxxxxxxxxx>
Cc: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
Cc: Pengutronix Kernel Team <kernel@xxxxxxxxxxxxxx>
Cc: Fabio Estevam <festevam@xxxxxxxxx>
Cc: NXP Linux Team <linux-imx@xxxxxxx>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@xxxxxxx>
---
drivers/mailbox/imx-mailbox.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mailbox/imx-mailbox.c b/drivers/mailbox/imx-mailbox.c
index 7205b825c8b5..f54f36948414 100644
--- a/drivers/mailbox/imx-mailbox.c
+++ b/drivers/mailbox/imx-mailbox.c
@@ -598,7 +598,7 @@ static const struct of_device_id imx_mu_dt_ids[] = {
};
MODULE_DEVICE_TABLE(of, imx_mu_dt_ids);

-static int imx_mu_suspend_noirq(struct device *dev)
+static int __maybe_unused imx_mu_suspend_noirq(struct device *dev)
{
struct imx_mu_priv *priv = dev_get_drvdata(dev);

@@ -608,7 +608,7 @@ static int imx_mu_suspend_noirq(struct device *dev)
return 0;
}

-static int imx_mu_resume_noirq(struct device *dev)
+static int __maybe_unused imx_mu_resume_noirq(struct device *dev)
{
struct imx_mu_priv *priv = dev_get_drvdata(dev);

--
2.27.0