diff options
author | Elise Lennion <elise.lennion@gmail.com> | 2016-10-27 22:24:27 -0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-10-30 11:13:11 -0400 |
commit | c2b6028fd10617252c679b21b41204c531347a00 (patch) | |
tree | 39de8ffe960124d92ab0f49ff410d62e8982ddd8 /drivers/staging/sm750fb | |
parent | 03140dabf584555e96440084d1ac426127bdf8c3 (diff) | |
download | linux-stable-c2b6028fd10617252c679b21b41204c531347a00.tar.gz linux-stable-c2b6028fd10617252c679b21b41204c531347a00.tar.bz2 linux-stable-c2b6028fd10617252c679b21b41204c531347a00.zip |
staging: sm750fb: Shorten local variables names.
Shorter names are preferred by C variables naming convention, they are
easier to write and aren't more difficult to understand.
Signed-off-by: Elise Lennion <elise.lennion@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/sm750fb')
-rw-r--r-- | drivers/staging/sm750fb/ddk750_power.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/staging/sm750fb/ddk750_power.c b/drivers/staging/sm750fb/ddk750_power.c index fda928032897..6f4374057405 100644 --- a/drivers/staging/sm750fb/ddk750_power.c +++ b/drivers/staging/sm750fb/ddk750_power.c @@ -29,26 +29,26 @@ static unsigned int get_power_mode(void) * SM50x can operate in one of three modes: 0, 1 or Sleep. * On hardware reset, power mode 0 is default. */ -void set_power_mode(unsigned int powerMode) +void set_power_mode(unsigned int mode) { - unsigned int control_value = 0; + unsigned int ctrl = 0; - control_value = PEEK32(POWER_MODE_CTRL) & ~POWER_MODE_CTRL_MODE_MASK; + ctrl = PEEK32(POWER_MODE_CTRL) & ~POWER_MODE_CTRL_MODE_MASK; if (sm750_get_chip_type() == SM750LE) return; - switch (powerMode) { + switch (mode) { case POWER_MODE_CTRL_MODE_MODE0: - control_value |= POWER_MODE_CTRL_MODE_MODE0; + ctrl |= POWER_MODE_CTRL_MODE_MODE0; break; case POWER_MODE_CTRL_MODE_MODE1: - control_value |= POWER_MODE_CTRL_MODE_MODE1; + ctrl |= POWER_MODE_CTRL_MODE_MODE1; break; case POWER_MODE_CTRL_MODE_SLEEP: - control_value |= POWER_MODE_CTRL_MODE_SLEEP; + ctrl |= POWER_MODE_CTRL_MODE_SLEEP; break; default: @@ -56,20 +56,20 @@ void set_power_mode(unsigned int powerMode) } /* Set up other fields in Power Control Register */ - if (powerMode == POWER_MODE_CTRL_MODE_SLEEP) { - control_value &= ~POWER_MODE_CTRL_OSC_INPUT; + if (mode == POWER_MODE_CTRL_MODE_SLEEP) { + ctrl &= ~POWER_MODE_CTRL_OSC_INPUT; #ifdef VALIDATION_CHIP - control_value &= ~POWER_MODE_CTRL_336CLK; + ctrl &= ~POWER_MODE_CTRL_336CLK; #endif } else { - control_value |= POWER_MODE_CTRL_OSC_INPUT; + ctrl |= POWER_MODE_CTRL_OSC_INPUT; #ifdef VALIDATION_CHIP - control_value |= POWER_MODE_CTRL_336CLK; + ctrl |= POWER_MODE_CTRL_336CLK; #endif } /* Program new power mode. */ - POKE32(POWER_MODE_CTRL, control_value); + POKE32(POWER_MODE_CTRL, ctrl); } void set_current_gate(unsigned int gate) |