linux-rtc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] rtc: mt2712: fix build without PM_SLEEP
@ 2020-03-17 14:34 Alexandre Belloni
  0 siblings, 0 replies; only message in thread
From: Alexandre Belloni @ 2020-03-17 14:34 UTC (permalink / raw)
  To: Eddie Huang, Sean Wang, Alessandro Zummo, Alexandre Belloni
  Cc: linux-arm-kernel, linux-mediatek, linux-rtc, linux-kernel

Fix this build error when PM_SLEEP is not selected:

drivers/rtc/rtc-mt2712.c:412:10: error: ‘mt2712_pm_ops’ undeclared here (not in a function); did you mean ‘mt2712_rtc_ops’?
  412 |   .pm = &mt2712_pm_ops,
      |          ^~~~~~~~~~~~~

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
---
 drivers/rtc/rtc-mt2712.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/rtc/rtc-mt2712.c b/drivers/rtc/rtc-mt2712.c
index 62c20241426d..581b8731fb8a 100644
--- a/drivers/rtc/rtc-mt2712.c
+++ b/drivers/rtc/rtc-mt2712.c
@@ -409,7 +409,9 @@ static struct platform_driver mt2712_rtc_driver = {
 	.driver = {
 		.name = "mt2712-rtc",
 		.of_match_table = mt2712_rtc_of_match,
+#ifdef CONFIG_PM_SLEEP
 		.pm = &mt2712_pm_ops,
+#endif
 	},
 	.probe  = mt2712_rtc_probe,
 };
-- 
2.24.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-03-17 14:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-17 14:34 [PATCH v2] rtc: mt2712: fix build without PM_SLEEP Alexandre Belloni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).