[PATCH] MIPS: prom.c: Only show machine name when it is available

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



'Unknown' machine name in /proc/cpuinfo will make users confused.
Therefore, it is better to show it only when it is available.

Signed-off-by: Kelvin Cheung <keguang.zhang@xxxxxxxxx>
---
 arch/mips/kernel/prom.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/mips/kernel/prom.c b/arch/mips/kernel/prom.c
index 5d39bb8..595fa5c 100644
--- a/arch/mips/kernel/prom.c
+++ b/arch/mips/kernel/prom.c
@@ -33,6 +33,9 @@ __init void mips_set_machine_name(const char *name)
 
 char *mips_get_machine_name(void)
 {
+	if (!strncmp(mips_machine_name, "Unknown", 64))
+		return NULL;
+
 	return mips_machine_name;
 }
 
-- 
1.9.1



[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux