Commit a91c5824 authored by Arnd Bergmann's avatar Arnd Bergmann

ARM: at91: fix pm declarations

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: default avatarArnd Bergmann <arnd@arndb.de>
Fixes: 4db0ba22 ("ARM: at91: pm: prepare for multiplatform")
Acked-by: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>
parent 99bd667a
...@@ -35,10 +35,10 @@ extern void __init at91sam9260_pm_init(void); ...@@ -35,10 +35,10 @@ extern void __init at91sam9260_pm_init(void);
extern void __init at91sam9g45_pm_init(void); extern void __init at91sam9g45_pm_init(void);
extern void __init at91sam9x5_pm_init(void); extern void __init at91sam9x5_pm_init(void);
#else #else
void __init at91rm9200_pm_init(void) { } static inline void __init at91rm9200_pm_init(void) { }
void __init at91sam9260_pm_init(void) { } static inline void __init at91sam9260_pm_init(void) { }
void __init at91sam9g45_pm_init(void) { } static inline void __init at91sam9g45_pm_init(void) { }
void __init at91sam9x5_pm_init(void) { } static inline void __init at91sam9x5_pm_init(void) { }
#endif #endif
#endif /* _AT91_GENERIC_H */ #endif /* _AT91_GENERIC_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment