mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-29 23:53:55 +08:00
a91c5824dd
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@arndb.de>
Fixes: 4db0ba22da
("ARM: at91: pm: prepare for multiplatform")
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>
45 lines
1.1 KiB
C
45 lines
1.1 KiB
C
/*
|
|
* linux/arch/arm/mach-at91/generic.h
|
|
*
|
|
* Copyright (C) 2005 David Brownell
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
* published by the Free Software Foundation.
|
|
*/
|
|
|
|
#ifndef _AT91_GENERIC_H
|
|
#define _AT91_GENERIC_H
|
|
|
|
#include <linux/of.h>
|
|
#include <linux/reboot.h>
|
|
|
|
/* Map io */
|
|
extern void __init at91_map_io(void);
|
|
extern void __init at91_alt_map_io(void);
|
|
|
|
/* Timer */
|
|
extern void at91rm9200_timer_init(void);
|
|
|
|
/* idle */
|
|
extern void at91rm9200_idle(void);
|
|
extern void at91sam9_idle(void);
|
|
|
|
/* Matrix */
|
|
extern void at91_ioremap_matrix(u32 base_addr);
|
|
|
|
|
|
#ifdef CONFIG_PM
|
|
extern void __init at91rm9200_pm_init(void);
|
|
extern void __init at91sam9260_pm_init(void);
|
|
extern void __init at91sam9g45_pm_init(void);
|
|
extern void __init at91sam9x5_pm_init(void);
|
|
#else
|
|
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 */
|