linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] regulator: Fix build breakage on !REGULATOR
@ 2015-02-04 10:45 Krzysztof Kozlowski
  2015-02-04 10:50 ` Krzysztof Kozlowski
  2015-02-04 11:23 ` Mark Brown
  0 siblings, 2 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2015-02-04 10:45 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, linux-kernel
  Cc: Marek Szyprowski, Bartlomiej Zolnierkiewicz, Krzysztof Kozlowski

Add missing stubs for regulator_suspend_prepare() and
regulator_suspend_finish() to fix exynos_defconfig build without
REGULATOR:

arch/arm/mach-exynos/built-in.o: In function `exynos_suspend_finish':
arch/arm/mach-exynos/suspend.c:537: undefined reference to `regulator_suspend_finish'
arch/arm/mach-exynos/built-in.o: In function `exynos_suspend_prepare':
arch/arm/mach-exynos/suspend.c:520: undefined reference to `regulator_suspend_prepare'
make: *** [vmlinux] Error 1

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Reported-by: Joerg Roedel <joro@8bytes.org>
Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
 include/linux/regulator/machine.h | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/include/linux/regulator/machine.h b/include/linux/regulator/machine.h
index 0b08d05d470b..b07562e082c4 100644
--- a/include/linux/regulator/machine.h
+++ b/include/linux/regulator/machine.h
@@ -191,15 +191,22 @@ struct regulator_init_data {
 	void *driver_data;	/* core does not touch this */
 };
 
-int regulator_suspend_prepare(suspend_state_t state);
-int regulator_suspend_finish(void);
-
 #ifdef CONFIG_REGULATOR
 void regulator_has_full_constraints(void);
+int regulator_suspend_prepare(suspend_state_t state);
+int regulator_suspend_finish(void);
 #else
 static inline void regulator_has_full_constraints(void)
 {
 }
+static inline int regulator_suspend_prepare(suspend_state_t state)
+{
+	return 0;
+}
+static inline int regulator_suspend_finish(void)
+{
+	return 0;
+}
 #endif
 
 #endif
-- 
1.9.1


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

* Re: [PATCH] regulator: Fix build breakage on !REGULATOR
  2015-02-04 10:45 [PATCH] regulator: Fix build breakage on !REGULATOR Krzysztof Kozlowski
@ 2015-02-04 10:50 ` Krzysztof Kozlowski
  2015-02-04 15:22   ` Joerg Roedel
  2015-02-04 11:23 ` Mark Brown
  1 sibling, 1 reply; 4+ messages in thread
From: Krzysztof Kozlowski @ 2015-02-04 10:50 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown
  Cc: linux-kernel, Marek Szyprowski, Bartlomiej Zolnierkiewicz, Joerg Roedel

On śro, 2015-02-04 at 11:45 +0100, Krzysztof Kozlowski wrote:
> Add missing stubs for regulator_suspend_prepare() and
> regulator_suspend_finish() to fix exynos_defconfig build without
> REGULATOR:
> 
> arch/arm/mach-exynos/built-in.o: In function `exynos_suspend_finish':
> arch/arm/mach-exynos/suspend.c:537: undefined reference to `regulator_suspend_finish'
> arch/arm/mach-exynos/built-in.o: In function `exynos_suspend_prepare':
> arch/arm/mach-exynos/suspend.c:520: undefined reference to `regulator_suspend_prepare'
> make: *** [vmlinux] Error 1
> 
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> Reported-by: Joerg Roedel <joro@8bytes.org>
> Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>

Heh, git send-email does not CC to reported-by people so +CC Joerg
Roedel for credits for:

https://lkml.org/lkml/2015/1/26/790


> ---
>  include/linux/regulator/machine.h | 13 ++++++++++---
>  1 file changed, 10 insertions(+), 3 deletions(-)
> 
> diff --git a/include/linux/regulator/machine.h b/include/linux/regulator/machine.h
> index 0b08d05d470b..b07562e082c4 100644
> --- a/include/linux/regulator/machine.h
> +++ b/include/linux/regulator/machine.h
> @@ -191,15 +191,22 @@ struct regulator_init_data {
>  	void *driver_data;	/* core does not touch this */
>  };
>  
> -int regulator_suspend_prepare(suspend_state_t state);
> -int regulator_suspend_finish(void);
> -
>  #ifdef CONFIG_REGULATOR
>  void regulator_has_full_constraints(void);
> +int regulator_suspend_prepare(suspend_state_t state);
> +int regulator_suspend_finish(void);
>  #else
>  static inline void regulator_has_full_constraints(void)
>  {
>  }
> +static inline int regulator_suspend_prepare(suspend_state_t state)
> +{
> +	return 0;
> +}
> +static inline int regulator_suspend_finish(void)
> +{
> +	return 0;
> +}
>  #endif
>  
>  #endif


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

* Re: [PATCH] regulator: Fix build breakage on !REGULATOR
  2015-02-04 10:45 [PATCH] regulator: Fix build breakage on !REGULATOR Krzysztof Kozlowski
  2015-02-04 10:50 ` Krzysztof Kozlowski
@ 2015-02-04 11:23 ` Mark Brown
  1 sibling, 0 replies; 4+ messages in thread
From: Mark Brown @ 2015-02-04 11:23 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Liam Girdwood, linux-kernel, Marek Szyprowski, Bartlomiej Zolnierkiewicz

[-- Attachment #1: Type: text/plain, Size: 223 bytes --]

On Wed, Feb 04, 2015 at 11:45:28AM +0100, Krzysztof Kozlowski wrote:
> Add missing stubs for regulator_suspend_prepare() and
> regulator_suspend_finish() to fix exynos_defconfig build without
> REGULATOR:

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

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

* Re: [PATCH] regulator: Fix build breakage on !REGULATOR
  2015-02-04 10:50 ` Krzysztof Kozlowski
@ 2015-02-04 15:22   ` Joerg Roedel
  0 siblings, 0 replies; 4+ messages in thread
From: Joerg Roedel @ 2015-02-04 15:22 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Liam Girdwood, Mark Brown, linux-kernel, Marek Szyprowski,
	Bartlomiej Zolnierkiewicz

On Wed, Feb 04, 2015 at 11:50:11AM +0100, Krzysztof Kozlowski wrote:
> >  #ifdef CONFIG_REGULATOR
> >  void regulator_has_full_constraints(void);
> > +int regulator_suspend_prepare(suspend_state_t state);
> > +int regulator_suspend_finish(void);
> >  #else
> >  static inline void regulator_has_full_constraints(void)
> >  {
> >  }
> > +static inline int regulator_suspend_prepare(suspend_state_t state)
> > +{
> > +	return 0;
> > +}
> > +static inline int regulator_suspend_finish(void)
> > +{
> > +	return 0;
> > +}
> >  #endif
> >  
> >  #endif

My solution would have been:

diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
index 603820e..0f3f860 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -25,6 +25,7 @@ menuconfig ARCH_EXYNOS
 	select S5P_DEV_MFC
 	select SRAM
 	select MFD_SYSCON
+	select REGULATOR if PM_SLEEP
 	help
 	  Support for SAMSUNG EXYNOS SoCs (EXYNOS4/5)

But that will work too, so:

Acked-by: Joerg Roedel <jroedel@suse.de>

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

end of thread, other threads:[~2015-02-04 15:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-04 10:45 [PATCH] regulator: Fix build breakage on !REGULATOR Krzysztof Kozlowski
2015-02-04 10:50 ` Krzysztof Kozlowski
2015-02-04 15:22   ` Joerg Roedel
2015-02-04 11:23 ` Mark Brown

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).