* [PATCH] PM / OPP: fix condition for empty of_init_opp_table()
@ 2013-02-21 11:04 Shawn Guo
2013-02-21 14:59 ` Nishanth Menon
2013-02-21 16:24 ` Rafael J. Wysocki
0 siblings, 2 replies; 3+ messages in thread
From: Shawn Guo @ 2013-02-21 11:04 UTC (permalink / raw)
To: linux-arm-kernel
randconfig build reports the following error which is caused by that
CONFIG_PM_OPP is unset.
CC arch/arm/mach-imx/mach-imx6q.o
arch/arm/mach-imx/mach-imx6q.c: In function ?imx6q_opp_init?:
arch/arm/mach-imx/mach-imx6q.c:248:2: error: implicit declaration of function ?of_init_opp_table? [-Werror=implicit-function-declaration]
Fix the error by giving a more correct condition for empty
of_init_opp_table() implementation.
Reported-by: Rob Herring <robherring2@gmail.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
---
include/linux/opp.h | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/include/linux/opp.h b/include/linux/opp.h
index 214e0eb..3aca2b8 100644
--- a/include/linux/opp.h
+++ b/include/linux/opp.h
@@ -47,15 +47,6 @@ int opp_enable(struct device *dev, unsigned long freq);
int opp_disable(struct device *dev, unsigned long freq);
struct srcu_notifier_head *opp_get_notifier(struct device *dev);
-
-#ifdef CONFIG_OF
-int of_init_opp_table(struct device *dev);
-#else
-static inline int of_init_opp_table(struct device *dev)
-{
- return -EINVAL;
-}
-#endif /* CONFIG_OF */
#else
static inline unsigned long opp_get_voltage(struct opp *opp)
{
@@ -112,6 +103,15 @@ static inline struct srcu_notifier_head *opp_get_notifier(struct device *dev)
}
#endif /* CONFIG_PM_OPP */
+#if defined(CONFIG_PM_OPP) && defined(CONFIG_OF)
+int of_init_opp_table(struct device *dev);
+#else
+static inline int of_init_opp_table(struct device *dev)
+{
+ return -EINVAL;
+}
+#endif
+
#if defined(CONFIG_CPU_FREQ) && defined(CONFIG_PM_OPP)
int opp_init_cpufreq_table(struct device *dev,
struct cpufreq_frequency_table **table);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] PM / OPP: fix condition for empty of_init_opp_table()
2013-02-21 11:04 [PATCH] PM / OPP: fix condition for empty of_init_opp_table() Shawn Guo
@ 2013-02-21 14:59 ` Nishanth Menon
2013-02-21 16:24 ` Rafael J. Wysocki
1 sibling, 0 replies; 3+ messages in thread
From: Nishanth Menon @ 2013-02-21 14:59 UTC (permalink / raw)
To: linux-arm-kernel
On 19:04-20130221, Shawn Guo wrote:
> randconfig build reports the following error which is caused by that
> CONFIG_PM_OPP is unset.
>
Minor: caused by CONFIG_PM_OPP not being set?
> CC arch/arm/mach-imx/mach-imx6q.o
> arch/arm/mach-imx/mach-imx6q.c: In function ?imx6q_opp_init?:
> arch/arm/mach-imx/mach-imx6q.c:248:2: error: implicit declaration of function ?of_init_opp_table? [-Werror=implicit-function-declaration]
thanks for catching this.
>
> Fix the error by giving a more correct condition for empty
> of_init_opp_table() implementation.
>
> Reported-by: Rob Herring <robherring2@gmail.com>
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> ---
> include/linux/opp.h | 18 +++++++++---------
> 1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/include/linux/opp.h b/include/linux/opp.h
> index 214e0eb..3aca2b8 100644
> --- a/include/linux/opp.h
> +++ b/include/linux/opp.h
> @@ -47,15 +47,6 @@ int opp_enable(struct device *dev, unsigned long freq);
> int opp_disable(struct device *dev, unsigned long freq);
>
> struct srcu_notifier_head *opp_get_notifier(struct device *dev);
> -
> -#ifdef CONFIG_OF
> -int of_init_opp_table(struct device *dev);
> -#else
> -static inline int of_init_opp_table(struct device *dev)
> -{
> - return -EINVAL;
> -}
> -#endif /* CONFIG_OF */
> #else
> static inline unsigned long opp_get_voltage(struct opp *opp)
> {
> @@ -112,6 +103,15 @@ static inline struct srcu_notifier_head *opp_get_notifier(struct device *dev)
> }
> #endif /* CONFIG_PM_OPP */
>
> +#if defined(CONFIG_PM_OPP) && defined(CONFIG_OF)
> +int of_init_opp_table(struct device *dev);
> +#else
> +static inline int of_init_opp_table(struct device *dev)
> +{
> + return -EINVAL;
> +}
> +#endif
> +
> #if defined(CONFIG_CPU_FREQ) && defined(CONFIG_PM_OPP)
> int opp_init_cpufreq_table(struct device *dev,
> struct cpufreq_frequency_table **table);
Acked-by: Nishanth Menon <nm@ti.com>
--
Regards,
Nishanth Menon
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] PM / OPP: fix condition for empty of_init_opp_table()
2013-02-21 11:04 [PATCH] PM / OPP: fix condition for empty of_init_opp_table() Shawn Guo
2013-02-21 14:59 ` Nishanth Menon
@ 2013-02-21 16:24 ` Rafael J. Wysocki
1 sibling, 0 replies; 3+ messages in thread
From: Rafael J. Wysocki @ 2013-02-21 16:24 UTC (permalink / raw)
To: linux-arm-kernel
On Thursday, February 21, 2013 07:04:45 PM Shawn Guo wrote:
> randconfig build reports the following error which is caused by that
> CONFIG_PM_OPP is unset.
>
> CC arch/arm/mach-imx/mach-imx6q.o
> arch/arm/mach-imx/mach-imx6q.c: In function ?imx6q_opp_init?:
> arch/arm/mach-imx/mach-imx6q.c:248:2: error: implicit declaration of function ?of_init_opp_table? [-Werror=implicit-function-declaration]
>
> Fix the error by giving a more correct condition for empty
> of_init_opp_table() implementation.
>
> Reported-by: Rob Herring <robherring2@gmail.com>
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Applied to linux-pm.git/linux-next, I'm going to push it to Linus later this
week.
Thanks,
Rafael
> ---
> include/linux/opp.h | 18 +++++++++---------
> 1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/include/linux/opp.h b/include/linux/opp.h
> index 214e0eb..3aca2b8 100644
> --- a/include/linux/opp.h
> +++ b/include/linux/opp.h
> @@ -47,15 +47,6 @@ int opp_enable(struct device *dev, unsigned long freq);
> int opp_disable(struct device *dev, unsigned long freq);
>
> struct srcu_notifier_head *opp_get_notifier(struct device *dev);
> -
> -#ifdef CONFIG_OF
> -int of_init_opp_table(struct device *dev);
> -#else
> -static inline int of_init_opp_table(struct device *dev)
> -{
> - return -EINVAL;
> -}
> -#endif /* CONFIG_OF */
> #else
> static inline unsigned long opp_get_voltage(struct opp *opp)
> {
> @@ -112,6 +103,15 @@ static inline struct srcu_notifier_head *opp_get_notifier(struct device *dev)
> }
> #endif /* CONFIG_PM_OPP */
>
> +#if defined(CONFIG_PM_OPP) && defined(CONFIG_OF)
> +int of_init_opp_table(struct device *dev);
> +#else
> +static inline int of_init_opp_table(struct device *dev)
> +{
> + return -EINVAL;
> +}
> +#endif
> +
> #if defined(CONFIG_CPU_FREQ) && defined(CONFIG_PM_OPP)
> int opp_init_cpufreq_table(struct device *dev,
> struct cpufreq_frequency_table **table);
>
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-02-21 16:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-21 11:04 [PATCH] PM / OPP: fix condition for empty of_init_opp_table() Shawn Guo
2013-02-21 14:59 ` Nishanth Menon
2013-02-21 16:24 ` Rafael J. Wysocki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox