summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorValentin Vidic <Valentin.Vidic@CARNet.hr>2018-01-27 10:42:16 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-02-16 15:35:04 +0100
commite6dd870a0080787b472ab8895bef91486c70ebcf (patch)
tree1bbe3f299ad28aef34e186492ab04528fc3ea381
parentf53c5d92b596b6f0a7dd1a636d1018e51230b271 (diff)
downloadlinux-e6dd870a0080787b472ab8895bef91486c70ebcf.tar.gz
linux-e6dd870a0080787b472ab8895bef91486c70ebcf.tar.bz2
linux-e6dd870a0080787b472ab8895bef91486c70ebcf.zip
staging: pi433: fix CamelCase for regValue
Local variable storing the new value for dio register so replace with dio_value. Update regaddr to dio_addr to match. Fixes checkpatch warnings: CHECK: Avoid CamelCase: <regValue> Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/pi433/rf69.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c
index ef56deccd0af..42c2e1c6b386 100644
--- a/drivers/staging/pi433/rf69.c
+++ b/drivers/staging/pi433/rf69.c
@@ -505,27 +505,27 @@ int rf69_set_dio_mapping(struct spi_device *spi, u8 DIONumber, u8 value)
{
u8 mask;
u8 shift;
- u8 regaddr;
- u8 regValue;
+ u8 dio_addr;
+ u8 dio_value;
switch (DIONumber) {
case 0:
- mask = MASK_DIO0; shift = SHIFT_DIO0; regaddr = REG_DIOMAPPING1;
+ mask = MASK_DIO0; shift = SHIFT_DIO0; dio_addr = REG_DIOMAPPING1;
break;
case 1:
- mask = MASK_DIO1; shift = SHIFT_DIO1; regaddr = REG_DIOMAPPING1;
+ mask = MASK_DIO1; shift = SHIFT_DIO1; dio_addr = REG_DIOMAPPING1;
break;
case 2:
- mask = MASK_DIO2; shift = SHIFT_DIO2; regaddr = REG_DIOMAPPING1;
+ mask = MASK_DIO2; shift = SHIFT_DIO2; dio_addr = REG_DIOMAPPING1;
break;
case 3:
- mask = MASK_DIO3; shift = SHIFT_DIO3; regaddr = REG_DIOMAPPING1;
+ mask = MASK_DIO3; shift = SHIFT_DIO3; dio_addr = REG_DIOMAPPING1;
break;
case 4:
- mask = MASK_DIO4; shift = SHIFT_DIO4; regaddr = REG_DIOMAPPING2;
+ mask = MASK_DIO4; shift = SHIFT_DIO4; dio_addr = REG_DIOMAPPING2;
break;
case 5:
- mask = MASK_DIO5; shift = SHIFT_DIO5; regaddr = REG_DIOMAPPING2;
+ mask = MASK_DIO5; shift = SHIFT_DIO5; dio_addr = REG_DIOMAPPING2;
break;
default:
dev_dbg(&spi->dev, "set: illegal input param");
@@ -533,13 +533,13 @@ int rf69_set_dio_mapping(struct spi_device *spi, u8 DIONumber, u8 value)
}
// read reg
- regValue = rf69_read_reg(spi, regaddr);
+ dio_value = rf69_read_reg(spi, dio_addr);
// delete old value
- regValue = regValue & ~mask;
+ dio_value = dio_value & ~mask;
// add new value
- regValue = regValue | value << shift;
+ dio_value = dio_value | value << shift;
// write back
- return rf69_write_reg(spi, regaddr, regValue);
+ return rf69_write_reg(spi, dio_addr, dio_value);
}
bool rf69_get_flag(struct spi_device *spi, enum flag flag)