From ab20efac1d48622e465cf3d9e0fc8f79f10927d2 Mon Sep 17 00:00:00 2001 From: Paul Walmsley Date: Tue, 13 Sep 2011 19:52:14 -0600 Subject: [PATCH] --- yaml --- r: 272543 b: refs/heads/master c: 91d92d6cc86c9390b891a96e12a452a644c3ad76 h: refs/heads/master i: 272541: 5a1cfa2f5186f1c4ffd3820aa3aad523413a02ea 272539: 4d79489ccb809a900f988986f08e7f15558572d8 272535: 426f7b9c7185d65c51ad12d6452081a8b101401b 272527: 6952e7a4ed09b707384b54fb1d4c0487d1c9ebe8 272511: 329fbac16f7bed4f85a2625b0c4a5a0a92af39d2 v: v3 --- [refs] | 2 +- trunk/arch/arm/mach-omap2/id.c | 48 ++++++++++++++++------------------ 2 files changed, 23 insertions(+), 27 deletions(-) diff --git a/[refs] b/[refs] index 989a92358609..ca8987dc03ab 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1f1b0353aa3ba5dfc35641452484ea4158ee3c9c +refs/heads/master: 91d92d6cc86c9390b891a96e12a452a644c3ad76 diff --git a/trunk/arch/arm/mach-omap2/id.c b/trunk/arch/arm/mach-omap2/id.c index 3f3f998c89e0..9fae4de824e1 100644 --- a/trunk/arch/arm/mach-omap2/id.c +++ b/trunk/arch/arm/mach-omap2/id.c @@ -429,84 +429,80 @@ static void __init omap4_check_revision(void) static void __init omap3_cpuinfo(void) { u8 rev = GET_OMAP_REVISION(); - char cpu_name[16], cpu_rev[16]; + const char *cpu_name, *cpu_rev; - /* OMAP3430 and OMAP3530 are assumed to be same. + /* + * OMAP3430 and OMAP3530 are assumed to be same. * * OMAP3525, OMAP3515 and OMAP3503 can be detected only based * on available features. Upon detection, update the CPU id * and CPU class bits. */ if (cpu_is_omap3630()) { - strcpy(cpu_name, "OMAP3630"); + cpu_name = "OMAP3630"; } else if (cpu_is_omap3517()) { - /* - * AM35xx devices - */ - if (omap3_has_sgx()) - strcpy(cpu_name, "AM3517"); - else - strcpy(cpu_name, "AM3505"); + /* AM35xx devices */ + cpu_name = (omap3_has_sgx()) ? "AM3517" : "AM3505"; } else if (cpu_is_ti816x()) { - strcpy(cpu_name, "TI816X"); + cpu_name = "TI816X"; } else if (omap3_has_iva() && omap3_has_sgx()) { /* OMAP3430, OMAP3525, OMAP3515, OMAP3503 devices */ - strcpy(cpu_name, "OMAP3430/3530"); + cpu_name = "OMAP3430/3530"; } else if (omap3_has_iva()) { - strcpy(cpu_name, "OMAP3525"); + cpu_name = "OMAP3525"; } else if (omap3_has_sgx()) { - strcpy(cpu_name, "OMAP3515"); + cpu_name = "OMAP3515"; } else { - strcpy(cpu_name, "OMAP3503"); + cpu_name = "OMAP3503"; } if (cpu_is_omap3630() || cpu_is_ti816x()) { switch (rev) { case OMAP_REVBITS_00: - strcpy(cpu_rev, "1.0"); + cpu_rev = "1.0"; break; case OMAP_REVBITS_01: - strcpy(cpu_rev, "1.1"); + cpu_rev = "1.1"; break; case OMAP_REVBITS_02: /* FALLTHROUGH */ default: /* Use the latest known revision as default */ - strcpy(cpu_rev, "1.2"); + cpu_rev = "1.2"; } } else if (cpu_is_omap3505() || cpu_is_omap3517()) { switch (rev) { case OMAP_REVBITS_00: - strcpy(cpu_rev, "1.0"); + cpu_rev = "1.0"; break; case OMAP_REVBITS_01: /* FALLTHROUGH */ default: /* Use the latest known revision as default */ - strcpy(cpu_rev, "1.1"); + cpu_rev = "1.1"; } } else { switch (rev) { case OMAP_REVBITS_00: - strcpy(cpu_rev, "1.0"); + cpu_rev = "1.0"; break; case OMAP_REVBITS_01: - strcpy(cpu_rev, "2.0"); + cpu_rev = "2.0"; break; case OMAP_REVBITS_02: - strcpy(cpu_rev, "2.1"); + cpu_rev = "2.1"; break; case OMAP_REVBITS_03: - strcpy(cpu_rev, "3.0"); + cpu_rev = "3.0"; break; case OMAP_REVBITS_04: - strcpy(cpu_rev, "3.1"); + cpu_rev = "3.1"; break; case OMAP_REVBITS_05: /* FALLTHROUGH */ default: /* Use the latest known revision as default */ - strcpy(cpu_rev, "3.1.2"); + cpu_rev = "3.1.2"; } }