From: Krzysztof Kozlowski Date: Wed, 4 Feb 2015 10:45:28 +0000 (+0100) Subject: regulator: Fix build breakage on !REGULATOR X-Git-Tag: v4.0-rc1~166^2~7^2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=509102760da3a21831e763560ba4715760e3fbda;p=karo-tx-linux.git regulator: Fix build breakage on !REGULATOR 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 Reported-by: Joerg Roedel Reported-by: Marek Szyprowski Signed-off-by: Mark Brown --- 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