mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-14 04:26:45 +00:00
[POWERPC] Cleanup calling mmio_nvram_init
This makes mmio_nvram_init() callable unconditionally by providing a dummy definition when CONFIG_MMIO_NVRAM is not defined. Signed-off-by: Kou Ishizaki <Kou.Ishizaki@toshiba.co.jp> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Paul Mackerras <paulus@samba.org>
This commit is contained in:
parent
38958dd911
commit
4751505cf7
2 changed files with 11 additions and 2 deletions
|
@ -179,9 +179,7 @@ static void __init cell_setup_arch(void)
|
||||||
conswitchp = &dummy_con;
|
conswitchp = &dummy_con;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_MMIO_NVRAM
|
|
||||||
mmio_nvram_init();
|
mmio_nvram_init();
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int __init cell_probe(void)
|
static int __init cell_probe(void)
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
#ifndef _ASM_POWERPC_NVRAM_H
|
#ifndef _ASM_POWERPC_NVRAM_H
|
||||||
#define _ASM_POWERPC_NVRAM_H
|
#define _ASM_POWERPC_NVRAM_H
|
||||||
|
|
||||||
|
#include <linux/errno.h>
|
||||||
|
|
||||||
#define NVRW_CNT 0x20
|
#define NVRW_CNT 0x20
|
||||||
#define NVRAM_HEADER_LEN 16 /* sizeof(struct nvram_header) */
|
#define NVRAM_HEADER_LEN 16 /* sizeof(struct nvram_header) */
|
||||||
#define NVRAM_BLOCK_LEN 16
|
#define NVRAM_BLOCK_LEN 16
|
||||||
|
@ -71,7 +73,16 @@ extern int nvram_clear_error_log(void);
|
||||||
extern struct nvram_partition *nvram_find_partition(int sig, const char *name);
|
extern struct nvram_partition *nvram_find_partition(int sig, const char *name);
|
||||||
|
|
||||||
extern int pSeries_nvram_init(void);
|
extern int pSeries_nvram_init(void);
|
||||||
|
|
||||||
|
#ifdef CONFIG_MMIO_NVRAM
|
||||||
extern int mmio_nvram_init(void);
|
extern int mmio_nvram_init(void);
|
||||||
|
#else
|
||||||
|
static inline int mmio_nvram_init(void)
|
||||||
|
{
|
||||||
|
return -ENODEV;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* __KERNEL__ */
|
#endif /* __KERNEL__ */
|
||||||
|
|
||||||
/* PowerMac specific nvram stuffs */
|
/* PowerMac specific nvram stuffs */
|
||||||
|
|
Loading…
Reference in a new issue