public inbox for dmaengine@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dmaengine: ti: k3-udma: define udma_pm_resume,suspend with CONFIG_PM_SLEEP
@ 2023-05-01  2:56 Tom Rix
  2023-05-16 17:44 ` Vinod Koul
  0 siblings, 1 reply; 2+ messages in thread
From: Tom Rix @ 2023-05-01  2:56 UTC (permalink / raw)
  To: peter.ujfalusi, vkoul; +Cc: dmaengine, linux-kernel, Tom Rix

gcc reports
drivers/dma/ti/k3-udma.c:5552:12: error: ‘udma_pm_resume’
  defined but not used [-Werror=unused-function]
 5552 | static int udma_pm_resume(struct device *dev)
      |            ^~~~~~~~~~~~~~
drivers/dma/ti/k3-udma.c:5530:12: error: ‘udma_pm_suspend’
  defined but not used [-Werror=unused-function]
 5530 | static int udma_pm_suspend(struct device *dev)
      |            ^~~~~~~~~~~~~~~

These functions are used conditionally with CONFIG_PM_SLEEP,
so they should be likewise defined.

Signed-off-by: Tom Rix <trix@redhat.com>
---
 drivers/dma/ti/k3-udma.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c
index fc3a2a05ab7b..f189b0f2e423 100644
--- a/drivers/dma/ti/k3-udma.c
+++ b/drivers/dma/ti/k3-udma.c
@@ -5527,6 +5527,7 @@ static int udma_probe(struct platform_device *pdev)
 	return ret;
 }
 
+#ifdef CONFIG_PM_SLEEP
 static int udma_pm_suspend(struct device *dev)
 {
 	struct udma_dev *ud = dev_get_drvdata(dev);
@@ -5573,6 +5574,7 @@ static int udma_pm_resume(struct device *dev)
 
 	return 0;
 }
+#endif
 
 static const struct dev_pm_ops udma_pm_ops = {
 	SET_LATE_SYSTEM_SLEEP_PM_OPS(udma_pm_suspend, udma_pm_resume)
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-05-16 17:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-01  2:56 [PATCH] dmaengine: ti: k3-udma: define udma_pm_resume,suspend with CONFIG_PM_SLEEP Tom Rix
2023-05-16 17:44 ` Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox