* [PATCH] soc: tegra: fix tegra_pmc_get_suspend_mode definition
@ 2020-04-08 19:01 Arnd Bergmann
2020-04-08 20:56 ` Dmitry Osipenko
2020-04-09 15:02 ` Thierry Reding
0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2020-04-08 19:01 UTC (permalink / raw)
To: soc, Thierry Reding, Jonathan Hunter, Dmitry Osipenko,
Daniel Lezcano, Peter De Schrijver
Cc: Arnd Bergmann, Thierry Reding, Venkat Reddy Talla, linux-tegra,
linux-kernel
When CONFIG_PM_SLEEP is disabled, the function is not defined,
causing a link failure:
arm-linux-gnueabi-ld: drivers/cpuidle/cpuidle-tegra.o: in function `tegra_cpuidle_probe':
cpuidle-tegra.c:(.text+0x24): undefined reference to `tegra_pmc_get_suspend_mode'
Change the #ifdef check according to the definition.
Fixes: 382ac8e22b90 ("cpuidle: tegra: Disable CC6 state if LP2 unavailable")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
include/soc/tegra/pmc.h | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/include/soc/tegra/pmc.h b/include/soc/tegra/pmc.h
index 0dd52b0a5c1b..361cb64246f7 100644
--- a/include/soc/tegra/pmc.h
+++ b/include/soc/tegra/pmc.h
@@ -168,7 +168,6 @@ int tegra_io_pad_power_disable(enum tegra_io_pad id);
int tegra_io_rail_power_on(unsigned int id);
int tegra_io_rail_power_off(unsigned int id);
-enum tegra_suspend_mode tegra_pmc_get_suspend_mode(void);
void tegra_pmc_set_suspend_mode(enum tegra_suspend_mode mode);
void tegra_pmc_enter_suspend_mode(enum tegra_suspend_mode mode);
@@ -220,11 +219,6 @@ static inline int tegra_io_rail_power_off(unsigned int id)
return -ENOSYS;
}
-static inline enum tegra_suspend_mode tegra_pmc_get_suspend_mode(void)
-{
- return TEGRA_SUSPEND_NONE;
-}
-
static inline void tegra_pmc_set_suspend_mode(enum tegra_suspend_mode mode)
{
}
@@ -235,4 +229,13 @@ static inline void tegra_pmc_enter_suspend_mode(enum tegra_suspend_mode mode)
#endif /* CONFIG_SOC_TEGRA_PMC */
+#if defined(CONFIG_SOC_TEGRA_PMC) && defined(CONFIG_PM_SLEEP)
+enum tegra_suspend_mode tegra_pmc_get_suspend_mode(void);
+#else
+static inline enum tegra_suspend_mode tegra_pmc_get_suspend_mode(void)
+{
+ return TEGRA_SUSPEND_NONE;
+}
+#endif
+
#endif /* __SOC_TEGRA_PMC_H__ */
--
2.26.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] soc: tegra: fix tegra_pmc_get_suspend_mode definition
2020-04-08 19:01 [PATCH] soc: tegra: fix tegra_pmc_get_suspend_mode definition Arnd Bergmann
@ 2020-04-08 20:56 ` Dmitry Osipenko
2020-04-09 15:02 ` Thierry Reding
1 sibling, 0 replies; 3+ messages in thread
From: Dmitry Osipenko @ 2020-04-08 20:56 UTC (permalink / raw)
To: Arnd Bergmann, soc, Thierry Reding, Jonathan Hunter,
Daniel Lezcano, Peter De Schrijver
Cc: Thierry Reding, Venkat Reddy Talla, linux-tegra, linux-kernel
08.04.2020 22:01, Arnd Bergmann пишет:
> When CONFIG_PM_SLEEP is disabled, the function is not defined,
> causing a link failure:
>
> arm-linux-gnueabi-ld: drivers/cpuidle/cpuidle-tegra.o: in function `tegra_cpuidle_probe':
> cpuidle-tegra.c:(.text+0x24): undefined reference to `tegra_pmc_get_suspend_mode'
>
> Change the #ifdef check according to the definition.
>
> Fixes: 382ac8e22b90 ("cpuidle: tegra: Disable CC6 state if LP2 unavailable")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
Reviewed-by: Dmitry Osipenko <digetx@gmail.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] soc: tegra: fix tegra_pmc_get_suspend_mode definition
2020-04-08 19:01 [PATCH] soc: tegra: fix tegra_pmc_get_suspend_mode definition Arnd Bergmann
2020-04-08 20:56 ` Dmitry Osipenko
@ 2020-04-09 15:02 ` Thierry Reding
1 sibling, 0 replies; 3+ messages in thread
From: Thierry Reding @ 2020-04-09 15:02 UTC (permalink / raw)
To: Arnd Bergmann
Cc: soc, Thierry Reding, Jonathan Hunter, Dmitry Osipenko,
Daniel Lezcano, Peter De Schrijver, Venkat Reddy Talla,
linux-tegra, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 783 bytes --]
On Wed, Apr 08, 2020 at 09:01:15PM +0200, Arnd Bergmann wrote:
> When CONFIG_PM_SLEEP is disabled, the function is not defined,
> causing a link failure:
>
> arm-linux-gnueabi-ld: drivers/cpuidle/cpuidle-tegra.o: in function `tegra_cpuidle_probe':
> cpuidle-tegra.c:(.text+0x24): undefined reference to `tegra_pmc_get_suspend_mode'
>
> Change the #ifdef check according to the definition.
>
> Fixes: 382ac8e22b90 ("cpuidle: tegra: Disable CC6 state if LP2 unavailable")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> include/soc/tegra/pmc.h | 15 +++++++++------
> 1 file changed, 9 insertions(+), 6 deletions(-)
Acked-by: Thierry Reding <treding@nvidia.com>
Let me know if you'd prefer me to send this in a pull request later on.
Thanks,
Thierry
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-04-09 15:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-08 19:01 [PATCH] soc: tegra: fix tegra_pmc_get_suspend_mode definition Arnd Bergmann
2020-04-08 20:56 ` Dmitry Osipenko
2020-04-09 15:02 ` Thierry Reding
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).