* [PATCH] shmobile/sh7372: Add missing CONFIG_PM guards to fix build failure
@ 2011-08-13 22:34 Peter Huewe
2011-08-13 23:55 ` Rafael J. Wysocki
0 siblings, 1 reply; 4+ messages in thread
From: Peter Huewe @ 2011-08-13 22:34 UTC (permalink / raw)
To: linux-arm-kernel
This patch fixes a build failure with the ap4evb_defconfig by adding the
missing #ifdef CONFIG_PM.
The build failure was:
arch/arm/mach-shmobile/setup-sh7372.c:852: error: 'sh7372_a4lc'
undeclared (first use in this function)
arch/arm/mach-shmobile/setup-sh7372.c:852: error: (Each undeclared
identifier is reported only once
arch/arm/mach-shmobile/setup-sh7372.c:852: error: for each function it
appears in.)
sh7372_a4lc is declared in arch/arm/mach-shmobile/pm-sh7372.c within a
#ifdef CONFIG_PM block. Since the defconfig is missing CONFIG_PM this
results in a build failure.
KernelVersion: linux-next 20110812 (cab7d82)
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
---
arch/arm/mach-shmobile/setup-sh7372.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-shmobile/setup-sh7372.c b/arch/arm/mach-shmobile/setup-sh7372.c
index df900bf..8455f0b 100644
--- a/arch/arm/mach-shmobile/setup-sh7372.c
+++ b/arch/arm/mach-shmobile/setup-sh7372.c
@@ -848,9 +848,9 @@ void __init sh7372_add_standard_devices(void)
sh7372_init_pm_domain(&sh7372_a3rv);
sh7372_init_pm_domain(&sh7372_a3ri);
sh7372_init_pm_domain(&sh7372_a3sg);
-
+#ifdef CONFIG_PM
pm_genpd_add_subdomain(&sh7372_a4lc.genpd, &sh7372_a3sg.genpd);
-
+#endif
platform_add_devices(sh7372_early_devices,
ARRAY_SIZE(sh7372_early_devices));
--
1.7.3.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] shmobile/sh7372: Add missing CONFIG_PM guards to fix build failure
2011-08-13 22:34 [PATCH] shmobile/sh7372: Add missing CONFIG_PM guards to fix build failure Peter Huewe
@ 2011-08-13 23:55 ` Rafael J. Wysocki
2011-08-15 14:30 ` Peter Hüwe
0 siblings, 1 reply; 4+ messages in thread
From: Rafael J. Wysocki @ 2011-08-13 23:55 UTC (permalink / raw)
To: linux-arm-kernel
On Sunday, August 14, 2011, Peter Huewe wrote:
> This patch fixes a build failure with the ap4evb_defconfig by adding the
> missing #ifdef CONFIG_PM.
This is not the right fix. Besides, you seem to be testing linux-next
and the build problem is in the linux-pm tree.
Please check if the appended patch fixes the problem for you.
Rafael
---
arch/arm/mach-shmobile/include/mach/sh7372.h | 3 +++
arch/arm/mach-shmobile/pm-sh7372.c | 6 ++++++
arch/arm/mach-shmobile/setup-sh7372.c | 2 +-
3 files changed, 10 insertions(+), 1 deletion(-)
Index: linux/arch/arm/mach-shmobile/include/mach/sh7372.h
=================================--- linux.orig/arch/arm/mach-shmobile/include/mach/sh7372.h
+++ linux/arch/arm/mach-shmobile/include/mach/sh7372.h
@@ -494,9 +494,12 @@ extern struct sh7372_pm_domain sh7372_a3
extern void sh7372_init_pm_domain(struct sh7372_pm_domain *sh7372_pd);
extern void sh7372_add_device_to_domain(struct sh7372_pm_domain *sh7372_pd,
struct platform_device *pdev);
+extern void sh7372_pm_add_subdomain(struct sh7372_pm_domain *sh7372_pd,
+ struct sh7372_pm_domain *sh7372_sd);
#else
#define sh7372_init_pm_domain(pd) do { } while(0)
#define sh7372_add_device_to_domain(pd, pdev) do { } while(0)
+#define sh7372_pm_add_subdomain(pd, sd) do { } while(0)
#endif /* CONFIG_PM */
#endif /* __ASM_SH7372_H__ */
Index: linux/arch/arm/mach-shmobile/setup-sh7372.c
=================================--- linux.orig/arch/arm/mach-shmobile/setup-sh7372.c
+++ linux/arch/arm/mach-shmobile/setup-sh7372.c
@@ -849,7 +849,7 @@ void __init sh7372_add_standard_devices(
sh7372_init_pm_domain(&sh7372_a3ri);
sh7372_init_pm_domain(&sh7372_a3sg);
- pm_genpd_add_subdomain(&sh7372_a4lc.genpd, &sh7372_a3rv.genpd);
+ sh7372_pm_add_subdomain(&sh7372_a4lc, &sh7372_a3rv);
platform_add_devices(sh7372_early_devices,
ARRAY_SIZE(sh7372_early_devices));
Index: linux/arch/arm/mach-shmobile/pm-sh7372.c
=================================--- linux.orig/arch/arm/mach-shmobile/pm-sh7372.c
+++ linux/arch/arm/mach-shmobile/pm-sh7372.c
@@ -119,6 +119,12 @@ void sh7372_add_device_to_domain(struct
pm_clk_add(dev, NULL);
}
+void sh7372_pm_add_subdomain(struct sh7372_pm_domain *sh7372_pd,
+ struct sh7372_pm_domain *sh7372_sd)
+{
+ pm_genpd_add_subdomain(&sh7372_pd->genpd, &sh7372_sd->genpd);
+}
+
struct sh7372_pm_domain sh7372_a4lc = {
.bit_shift = 1,
};
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] shmobile/sh7372: Add missing CONFIG_PM guards to fix build failure
2011-08-13 23:55 ` Rafael J. Wysocki
@ 2011-08-15 14:30 ` Peter Hüwe
2011-08-15 17:45 ` Rafael J. Wysocki
0 siblings, 1 reply; 4+ messages in thread
From: Peter Hüwe @ 2011-08-15 14:30 UTC (permalink / raw)
To: linux-arm-kernel
Am Sonntag 14 August 2011, 01:55:05 schrieb Rafael J. Wysocki:
> On Sunday, August 14, 2011, Peter Huewe wrote:
> > This patch fixes a build failure with the ap4evb_defconfig by adding the
> > missing #ifdef CONFIG_PM.
>
> This is not the right fix. Besides, you seem to be testing linux-next
> and the build problem is in the linux-pm tree.
>
> Please check if the appended patch fixes the problem for you.
>
> Rafael
Works for me - compiles ;)
Reviewed-by: Peter Huewe <peterhuewe@gmx.de>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] shmobile/sh7372: Add missing CONFIG_PM guards to fix build failure
2011-08-15 14:30 ` Peter Hüwe
@ 2011-08-15 17:45 ` Rafael J. Wysocki
0 siblings, 0 replies; 4+ messages in thread
From: Rafael J. Wysocki @ 2011-08-15 17:45 UTC (permalink / raw)
To: linux-arm-kernel
On Monday, August 15, 2011, Peter Hüwe wrote:
> Am Sonntag 14 August 2011, 01:55:05 schrieb Rafael J. Wysocki:
> > On Sunday, August 14, 2011, Peter Huewe wrote:
> > > This patch fixes a build failure with the ap4evb_defconfig by adding the
> > > missing #ifdef CONFIG_PM.
> >
> > This is not the right fix. Besides, you seem to be testing linux-next
> > and the build problem is in the linux-pm tree.
> >
> > Please check if the appended patch fixes the problem for you.
> >
> > Rafael
> Works for me - compiles ;)
>
> Reviewed-by: Peter Huewe <peterhuewe@gmx.de>
Good, thanks for testing!
I have folded the fix into the patch that caused the problem, so this
should be fixed in linux-next now.
Thanks,
Rafael
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-08-15 17:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-13 22:34 [PATCH] shmobile/sh7372: Add missing CONFIG_PM guards to fix build failure Peter Huewe
2011-08-13 23:55 ` Rafael J. Wysocki
2011-08-15 14:30 ` Peter Hüwe
2011-08-15 17:45 ` 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