diff options
author | John Crispin <blogic@openwrt.org> | 2013-04-11 05:34:59 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2013-05-08 01:19:07 +0200 |
commit | 9169a5d01114c930a0494f9160da8c334d71680d (patch) | |
tree | c050c4650a3395076beeba4fb0a7aa33a4252830 /arch/mips/kernel/mips_machine.c | |
parent | d41d547a419ca2d4df867a40a553abfe0c3df1d6 (diff) | |
download | op-kernel-dev-9169a5d01114c930a0494f9160da8c334d71680d.zip op-kernel-dev-9169a5d01114c930a0494f9160da8c334d71680d.tar.gz |
MIPS: move mips_{set,get}_machine_name() to a more generic place
Previously this functionality was only available to users of the mips_machine
api. Moving the code to prom.c allows us to also add a OF wrapper.
Signed-off-by: John Crispin <blogic@openwrt.org>
Patchwork: http://patchwork.linux-mips.org/patch/5164/
Diffstat (limited to 'arch/mips/kernel/mips_machine.c')
-rw-r--r-- | arch/mips/kernel/mips_machine.c | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/arch/mips/kernel/mips_machine.c b/arch/mips/kernel/mips_machine.c index 411a058..8760975 100644 --- a/arch/mips/kernel/mips_machine.c +++ b/arch/mips/kernel/mips_machine.c @@ -11,9 +11,9 @@ #include <linux/slab.h> #include <asm/mips_machine.h> +#include <asm/prom.h> static struct mips_machine *mips_machine __initdata; -static char *mips_machine_name = "Unknown"; #define for_each_machine(mach) \ for ((mach) = (struct mips_machine *)&__mips_machines_start; \ @@ -21,25 +21,6 @@ static char *mips_machine_name = "Unknown"; (unsigned long)(mach) < (unsigned long)&__mips_machines_end; \ (mach)++) -__init void mips_set_machine_name(const char *name) -{ - char *p; - - if (name == NULL) - return; - - p = kstrdup(name, GFP_KERNEL); - if (!p) - pr_err("MIPS: no memory for machine_name\n"); - - mips_machine_name = p; -} - -char *mips_get_machine_name(void) -{ - return mips_machine_name; -} - __init int mips_machtype_setup(char *id) { struct mips_machine *mach; @@ -79,7 +60,6 @@ __init void mips_machine_setup(void) return; mips_set_machine_name(mips_machine->mach_name); - pr_info("MIPS: machine is %s\n", mips_machine_name); if (mips_machine->mach_setup) mips_machine->mach_setup(); |