Linux Power Management development
 help / color / mirror / Atom feed
* [PATCH] pmdomain: ti_sci: add CONFIG_PM_SLEEP dependency
@ 2024-11-11 10:46 Arnd Bergmann
  2024-11-11 12:37 ` Nishanth Menon
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2024-11-11 10:46 UTC (permalink / raw)
  To: Ulf Hansson, Vibhore Vardhan, Kevin Hilman, Nishanth Menon,
	Markus Schneider-Pargmann
  Cc: Arnd Bergmann, linux-pm, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

Without CONFIG_PM_SLEEP, the pm_generic_suspend() function cannot be called
since it is defined to NULL:

In file included from include/uapi/linux/posix_types.h:5,
		...
                 from drivers/pmdomain/ti/ti_sci_pm_domains.c:10:
drivers/pmdomain/ti/ti_sci_pm_domains.c: In function 'ti_sci_pd_suspend':
include/linux/stddef.h:9:14: error: called object is not a function or function pointer
    9 | #define NULL ((void *)0)
      |              ^
include/linux/pm.h:875:41: note: in expansion of macro 'NULL'
  875 | #define pm_generic_suspend              NULL
      |                                         ^~~~
drivers/pmdomain/ti/ti_sci_pm_domains.c:134:15: note: in expansion of macro 'pm_generic_suspend'
  134 |         ret = pm_generic_suspend(dev);
      |               ^~~~~~~~~~~~~~~~~~

Fixes: 7c2c8d2651b5 ("pmdomain: ti_sci: add per-device latency constraint management")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/pmdomain/ti/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/pmdomain/ti/Kconfig b/drivers/pmdomain/ti/Kconfig
index 67c608bf7ed0..f92fa9b58bb0 100644
--- a/drivers/pmdomain/ti/Kconfig
+++ b/drivers/pmdomain/ti/Kconfig
@@ -11,6 +11,7 @@ config TI_SCI_PM_DOMAINS
 	tristate "TI SCI PM Domains Driver"
 	depends on TI_SCI_PROTOCOL
 	depends on PM_GENERIC_DOMAINS
+	depends on PM_SLEEP
 	help
 	  Generic power domain implementation for TI device implementing
 	  the TI SCI protocol.
-- 
2.39.5


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

end of thread, other threads:[~2024-11-11 12:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-11 10:46 [PATCH] pmdomain: ti_sci: add CONFIG_PM_SLEEP dependency Arnd Bergmann
2024-11-11 12:37 ` Nishanth Menon

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