Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Elise Lennion and committed by
Greg Kroah-Hartman
c2b6028f 03140dab

+13 -13
+13 -13
drivers/staging/sm750fb/ddk750_power.c
··· 29 29 * SM50x can operate in one of three modes: 0, 1 or Sleep. 30 30 * On hardware reset, power mode 0 is default. 31 31 */ 32 - void set_power_mode(unsigned int powerMode) 32 + void set_power_mode(unsigned int mode) 33 33 { 34 - unsigned int control_value = 0; 34 + unsigned int ctrl = 0; 35 35 36 - control_value = PEEK32(POWER_MODE_CTRL) & ~POWER_MODE_CTRL_MODE_MASK; 36 + ctrl = PEEK32(POWER_MODE_CTRL) & ~POWER_MODE_CTRL_MODE_MASK; 37 37 38 38 if (sm750_get_chip_type() == SM750LE) 39 39 return; 40 40 41 - switch (powerMode) { 41 + switch (mode) { 42 42 case POWER_MODE_CTRL_MODE_MODE0: 43 - control_value |= POWER_MODE_CTRL_MODE_MODE0; 43 + ctrl |= POWER_MODE_CTRL_MODE_MODE0; 44 44 break; 45 45 46 46 case POWER_MODE_CTRL_MODE_MODE1: 47 - control_value |= POWER_MODE_CTRL_MODE_MODE1; 47 + ctrl |= POWER_MODE_CTRL_MODE_MODE1; 48 48 break; 49 49 50 50 case POWER_MODE_CTRL_MODE_SLEEP: 51 - control_value |= POWER_MODE_CTRL_MODE_SLEEP; 51 + ctrl |= POWER_MODE_CTRL_MODE_SLEEP; 52 52 break; 53 53 54 54 default: ··· 56 56 } 57 57 58 58 /* Set up other fields in Power Control Register */ 59 - if (powerMode == POWER_MODE_CTRL_MODE_SLEEP) { 60 - control_value &= ~POWER_MODE_CTRL_OSC_INPUT; 59 + if (mode == POWER_MODE_CTRL_MODE_SLEEP) { 60 + ctrl &= ~POWER_MODE_CTRL_OSC_INPUT; 61 61 #ifdef VALIDATION_CHIP 62 - control_value &= ~POWER_MODE_CTRL_336CLK; 62 + ctrl &= ~POWER_MODE_CTRL_336CLK; 63 63 #endif 64 64 } else { 65 - control_value |= POWER_MODE_CTRL_OSC_INPUT; 65 + ctrl |= POWER_MODE_CTRL_OSC_INPUT; 66 66 #ifdef VALIDATION_CHIP 67 - control_value |= POWER_MODE_CTRL_336CLK; 67 + ctrl |= POWER_MODE_CTRL_336CLK; 68 68 #endif 69 69 } 70 70 71 71 /* Program new power mode. */ 72 - POKE32(POWER_MODE_CTRL, control_value); 72 + POKE32(POWER_MODE_CTRL, ctrl); 73 73 } 74 74 75 75 void set_current_gate(unsigned int gate)