pmdomain: ti_sci: add CONFIG_PM_SLEEP dependency
PATCH 1/1 pmdomain: ti_sci: add CONFIG_PM_SLEEP dependency
From: Arnd Bergmann <[email protected]>
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);
| ^~~~~~~~~~~~~~~~~~--- drivers/pmdomain/ti/Kconfig | 1 + 1 file changed, 1 insertion(+)
drivers/pmdomain/ti/Kconfig +1 -0
@@ -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.
Signature · 1 line
2.39.5
Quoted 19 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
Without
CONFIG_PM_SLEEP, thepm_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); | ^~~~~~~~~~~~~~~~~~
Quoted 1 line
Fixes 7c2c8d2651b5 ("pmdomain: ti_sci: add per-device latency constraint management")
Arnd, thanks, but the breakage never made it to the pull request.
lkft caught it[1] and I had dropped the series from my queue[2]. Kevin reposted a v5 of the series with the fixups[3] - hopefully with the dependencies merged, we should see that go via Ulf's tree for the next window.
[1] https://lore.kernel.org/all/CA+G9fYtioQ22nVr9m22+qyMqUNRsGdA=cFw_j1OUv=x8Pcs-bw@mail.gmail.com/
[2] https://lore.kernel.org/all/[email protected]/
[3] https://lore.kernel.org/linux-pm/20241101-lpm-v6-10-constraints-pmdomain-v5-0-3011aa04622f@baylibre.com/
Signature · 3 lines
Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D