[PATCH] x86: allow multiple values to be specified with"hpet="

From: Jan Beulich
Date: Mon Apr 02 2012 - 10:17:37 EST


This is particularly to be able to specify "hpet=force,verbose", as
"force" ought to be a primary candidate for also wanting to use
"verbose".

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

---
arch/x86/kernel/hpet.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

--- 3.4-rc1-x86-hpet.orig/arch/x86/kernel/hpet.c
+++ 3.4-rc1-x86-hpet/arch/x86/kernel/hpet.c
@@ -94,13 +94,18 @@ static int hpet_verbose;

static int __init hpet_setup(char *str)
{
- if (str) {
+ while (str) {
+ char *next = strchr(str, ',');
+
+ if (next)
+ *next++ = 0;
if (!strncmp("disable", str, 7))
boot_hpet_disable = 1;
if (!strncmp("force", str, 5))
hpet_force_user = 1;
if (!strncmp("verbose", str, 7))
hpet_verbose = 1;
+ str = next;
}
return 1;
}



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/