Skip to contentSkip to conversation

rtc: mt2712: fix build without PM_SLEEP

PATCH New Alexandre Belloni 1 participant 1 message Mar 17, 2020

Subsystems (3)
lore
Share & tools
lore

Alexandre Belloni

author maintainer
#0 lore raw

PATCH v2 1/1 rtc: mt2712: fix build without PM_SLEEP

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,

      |          ^~~~~~~~~~~~~
---
 drivers/rtc/rtc-mt2712.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/rtc/rtc-mt2712.c +2 -0
index 62c20241426d..581b8731fb8a 100644
@@ -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,
 };
Signature · 1 line
2.24.1