[PATCH 06/11] ARM: at91: fix pm declarations

Nicolas Ferre nicolas.ferre at atmel.com
Fri Feb 13 00:37:05 PST 2015


Le 12/02/2015 20:42, Arnd Bergmann a écrit :
> In a recent rearrangement of the at91 pm initialization code, a broken
> set of declarations was added for the !CONFIG_PM-case, leading to
> this link error:
> 
> arch/arm/mach-at91/board-dt-sama5.o: In function `at91_rm9200_pm_init':
> arch/arm/mach-at91/generic.h:40: multiple definition of `at91_rm9200_pm_init'
> arch/arm/mach-at91/setup.o:arch/arm/mach-at91/generic.h:40: first defined here
> arch/arm/mach-at91/board-dt-sama5.o: In function `at91_sam9260_pm_init':
> arch/arm/mach-at91/generic.h:41: multiple definition of `at91_sam9260_pm_init'
> arch/arm/mach-at91/setup.o:arch/arm/mach-at91/generic.h:41: first defined here
> arch/arm/mach-at91/board-dt-sama5.o: In function `at91_sam9g45_pm_init':
> arch/arm/mach-at91/generic.h:42: multiple definition of `at91_sam9g45_pm_init'
> arch/arm/mach-at91/setup.o:arch/arm/mach-at91/generic.h:42: first defined here
> 
> This adds the missing 'static inline' to the declarations to avoid
> creating a copy of the functions in each file that includes the
> header.
> 
> Signed-off-by: Arnd Bergmann <arnd at arndb.de>
> Fixes: 4db0ba22da9 ("ARM: at91: pm: prepare for multiplatform")
> Cc: Nicolas Ferre <nicolas.ferre at atmel.com>

Yes:
Acked-by: Nicolas Ferre <nicolas.ferre at atmel.com>

Thanks Arnd. Bye,

> Cc: Jean-Christophe Plagniol-Villard <plagnioj at jcrosoft.com>
> Cc: Alexandre Belloni <alexandre.belloni at free-electrons.com>
> ---
>  arch/arm/mach-at91/generic.h | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/arm/mach-at91/generic.h b/arch/arm/mach-at91/generic.h
> index a6e726a6e0b5..583369ffc284 100644
> --- a/arch/arm/mach-at91/generic.h
> +++ b/arch/arm/mach-at91/generic.h
> @@ -35,10 +35,10 @@ extern void __init at91sam9260_pm_init(void);
>  extern void __init at91sam9g45_pm_init(void);
>  extern void __init at91sam9x5_pm_init(void);
>  #else
> -void __init at91rm9200_pm_init(void) { }
> -void __init at91sam9260_pm_init(void) { }
> -void __init at91sam9g45_pm_init(void) { }
> -void __init at91sam9x5_pm_init(void) { }
> +static inline void __init at91rm9200_pm_init(void) { }
> +static inline void __init at91sam9260_pm_init(void) { }
> +static inline void __init at91sam9g45_pm_init(void) { }
> +static inline void __init at91sam9x5_pm_init(void) { }
>  #endif
>  
>  #endif /* _AT91_GENERIC_H */
> 


-- 
Nicolas Ferre



More information about the linux-arm-kernel mailing list