From 5bf8b724d206d8e46da504eda847a1d2f9ad4e70 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 9 Feb 2011 12:39:01 -0800 Subject: [PATCH] Staging: samsung-laptop: fix up some variable nameing No camelcase in the Linux kernel please. Cc: Ingmar Steen Signed-off-by: Greg Kroah-Hartman --- .../staging/samsung-laptop/samsung-laptop.c | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/drivers/staging/samsung-laptop/samsung-laptop.c b/drivers/staging/samsung-laptop/samsung-laptop.c index 2911effbaa35..ca11535e8974 100644 --- a/drivers/staging/samsung-laptop/samsung-laptop.c +++ b/drivers/staging/samsung-laptop/samsung-laptop.c @@ -446,7 +446,7 @@ static ssize_t get_performance_level(struct device *dev, { struct sabi_retval sretval; int retval; - int pLevel; + int i; /* Read the state */ retval = sabi_get_command(sabi_config->commands.get_performance_level, @@ -455,9 +455,9 @@ static ssize_t get_performance_level(struct device *dev, return retval; /* The logic is backwards, yeah, lots of fun... */ - for (pLevel = 0; sabi_config->performance_levels[pLevel].name; ++pLevel) { - if (sretval.retval[0] == sabi_config->performance_levels[pLevel].value) - return sprintf(buf, "%s\n", sabi_config->performance_levels[pLevel].name); + for (i = 0; sabi_config->performance_levels[i].name; ++i) { + if (sretval.retval[0] == sabi_config->performance_levels[i].value) + return sprintf(buf, "%s\n", sabi_config->performance_levels[i].name); } return sprintf(buf, "%s\n", "unknown"); } @@ -467,17 +467,17 @@ static ssize_t set_performance_level(struct device *dev, size_t count) { if (count >= 1) { - int pLevel; - for (pLevel = 0; sabi_config->performance_levels[pLevel].name; ++pLevel) { + int i; + for (i = 0; sabi_config->performance_levels[i].name; ++i) { struct sabi_performance_level *level = - &sabi_config->performance_levels[pLevel]; + &sabi_config->performance_levels[i]; if (!strncasecmp(level->name, buf, strlen(level->name))) { sabi_set_command(sabi_config->commands.set_performance_level, level->value); break; } } - if (!sabi_config->performance_levels[pLevel].name) + if (!sabi_config->performance_levels[i].name) return -EINVAL; } return count; @@ -530,18 +530,18 @@ MODULE_DEVICE_TABLE(dmi, samsung_dmi_table); static int find_signature(void __iomem *memcheck, const char *testStr) { - int pStr; + int i = 0; int loca; - pStr = 0; + for (loca = 0; loca < 0xffff; loca++) { char temp = readb(memcheck + loca); - if (temp == testStr[pStr]) { - if (pStr == strlen(testStr)-1) + if (temp == testStr[i]) { + if (i == strlen(testStr)-1) break; - ++pStr; + ++i; } else { - pStr = 0; + i = 0; } } return loca; @@ -552,7 +552,7 @@ static int __init samsung_init(void) struct backlight_properties props; struct sabi_retval sretval; unsigned int ifaceP; - int pConfig; + int i; int loca; int retval; @@ -568,8 +568,8 @@ static int __init samsung_init(void) } /* Try to find one of the signatures in memory to find the header */ - for (pConfig = 0; sabi_configs[pConfig].test_string != 0; ++pConfig) { - sabi_config = &sabi_configs[pConfig]; + for (i = 0; sabi_configs[i].test_string != 0; ++i) { + sabi_config = &sabi_configs[i]; loca = find_signature(f0000_segment, sabi_config->test_string); if (loca != 0xffff) break; -- 2.20.1