aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/mips_machine.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/kernel/mips_machine.c')
-rw-r--r--arch/mips/kernel/mips_machine.c22
1 files changed, 1 insertions, 21 deletions
diff --git a/arch/mips/kernel/mips_machine.c b/arch/mips/kernel/mips_machine.c
index 411a058d2c53..876097529697 100644
--- a/arch/mips/kernel/mips_machine.c
+++ b/arch/mips/kernel/mips_machine.c
@@ -11,9 +11,9 @@
11#include <linux/slab.h> 11#include <linux/slab.h>
12 12
13#include <asm/mips_machine.h> 13#include <asm/mips_machine.h>
14#include <asm/prom.h>
14 15
15static struct mips_machine *mips_machine __initdata; 16static struct mips_machine *mips_machine __initdata;
16static char *mips_machine_name = "Unknown";
17 17
18#define for_each_machine(mach) \ 18#define for_each_machine(mach) \
19 for ((mach) = (struct mips_machine *)&__mips_machines_start; \ 19 for ((mach) = (struct mips_machine *)&__mips_machines_start; \
@@ -21,25 +21,6 @@ static char *mips_machine_name = "Unknown";
21 (unsigned long)(mach) < (unsigned long)&__mips_machines_end; \ 21 (unsigned long)(mach) < (unsigned long)&__mips_machines_end; \
22 (mach)++) 22 (mach)++)
23 23
24__init void mips_set_machine_name(const char *name)
25{
26 char *p;
27
28 if (name == NULL)
29 return;
30
31 p = kstrdup(name, GFP_KERNEL);
32 if (!p)
33 pr_err("MIPS: no memory for machine_name\n");
34
35 mips_machine_name = p;
36}
37
38char *mips_get_machine_name(void)
39{
40 return mips_machine_name;
41}
42
43__init int mips_machtype_setup(char *id) 24__init int mips_machtype_setup(char *id)
44{ 25{
45 struct mips_machine *mach; 26 struct mips_machine *mach;
@@ -79,7 +60,6 @@ __init void mips_machine_setup(void)
79 return; 60 return;
80 61
81 mips_set_machine_name(mips_machine->mach_name); 62 mips_set_machine_name(mips_machine->mach_name);
82 pr_info("MIPS: machine is %s\n", mips_machine_name);
83 63
84 if (mips_machine->mach_setup) 64 if (mips_machine->mach_setup)
85 mips_machine->mach_setup(); 65 mips_machine->mach_setup();