Fixes checkpatch warnings:
CHECK: Avoid CamelCase: <setup_GPIOs>
CHECK: Avoid CamelCase: <free_GPIOs>
Signed-off-by: Valentin Vidic <[email protected]>
---
drivers/staging/pi433/pi433_if.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/staging/pi433/pi433_if.c
index 5c6a7224180a..583b3803cf38 100644
--- a/drivers/staging/pi433/pi433_if.c
+++ b/drivers/staging/pi433/pi433_if.c
@@ -997,7 +997,7 @@ static int pi433_release(struct inode *inode, struct file *filp)
/*-------------------------------------------------------------------------*/
-static int setup_GPIOs(struct pi433_device *device)
+static int setup_gpio(struct pi433_device *device)
{
char name[5];
int retval;
@@ -1059,7 +1059,7 @@ static int setup_GPIOs(struct pi433_device *device)
return 0;
}
-static void free_GPIOs(struct pi433_device *device)
+static void free_gpio(struct pi433_device *device)
{
int i;
@@ -1174,7 +1174,7 @@ static int pi433_probe(struct spi_device *spi)
mutex_init(&device->rx_lock);
/* setup GPIO (including irq_handler) for the different DIOs */
- retval = setup_GPIOs(device);
+ retval = setup_gpio(device);
if (retval) {
dev_dbg(&spi->dev, "setup of GPIOs failed");
goto GPIO_failed;
@@ -1261,7 +1261,7 @@ static int pi433_probe(struct spi_device *spi)
device_create_failed:
pi433_free_minor(device);
minor_failed:
- free_GPIOs(device);
+ free_gpio(device);
GPIO_failed:
kfree(device);
@@ -1273,7 +1273,7 @@ static int pi433_remove(struct spi_device *spi)
struct pi433_device *device = spi_get_drvdata(spi);
/* free GPIOs */
- free_GPIOs(device);
+ free_gpio(device);
/* make sure ops on existing fds can abort cleanly */
device->spi = NULL;
--
2.16.2
Fixes checkpatch warnings:
CHECK: Avoid CamelCase: <bitRate>
CHECK: Avoid CamelCase: <bitRate_min>
CHECK: Avoid CamelCase: <bitRate_reg>
Signed-off-by: Valentin Vidic <[email protected]>
---
drivers/staging/pi433/rf69.c | 16 ++++++++--------
drivers/staging/pi433/rf69.h | 2 +-
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c
index b57d3f4e9321..e11c9cca447b 100644
--- a/drivers/staging/pi433/rf69.c
+++ b/drivers/staging/pi433/rf69.c
@@ -201,26 +201,26 @@ int rf69_set_modulation_shaping(struct spi_device *spi,
}
}
-int rf69_set_bit_rate(struct spi_device *spi, u16 bitRate)
+int rf69_set_bit_rate(struct spi_device *spi, u16 bit_rate)
{
int retval;
- u32 bitRate_min;
- u32 bitRate_reg;
+ u32 bit_rate_min;
+ u32 bit_rate_reg;
u8 msb;
u8 lsb;
// check input value
- bitRate_min = F_OSC / 8388608; // 8388608 = 2^23;
- if (bitRate < bitRate_min) {
+ bit_rate_min = F_OSC / 8388608; // 8388608 = 2^23;
+ if (bit_rate < bit_rate_min) {
dev_dbg(&spi->dev, "setBitRate: illegal input param");
return -EINVAL;
}
// calculate reg settings
- bitRate_reg = (F_OSC / bitRate);
+ bit_rate_reg = (F_OSC / bit_rate);
- msb = (bitRate_reg & 0xff00) >> 8;
- lsb = (bitRate_reg & 0xff);
+ msb = (bit_rate_reg & 0xff00) >> 8;
+ lsb = (bit_rate_reg & 0xff);
// transmit to RF 69
retval = rf69_write_reg(spi, REG_BITRATE_MSB, msb);
diff --git a/drivers/staging/pi433/rf69.h b/drivers/staging/pi433/rf69.h
index 78366f251084..ee22a10c85c0 100644
--- a/drivers/staging/pi433/rf69.h
+++ b/drivers/staging/pi433/rf69.h
@@ -29,7 +29,7 @@ int rf69_set_mode(struct spi_device *spi, enum mode mode);
int rf69_set_data_mode(struct spi_device *spi, u8 data_mode);
int rf69_set_modulation(struct spi_device *spi, enum modulation modulation);
int rf69_set_modulation_shaping(struct spi_device *spi, enum mod_shaping mod_shaping);
-int rf69_set_bit_rate(struct spi_device *spi, u16 bitRate);
+int rf69_set_bit_rate(struct spi_device *spi, u16 bit_rate);
int rf69_set_deviation(struct spi_device *spi, u32 deviation);
int rf69_set_frequency(struct spi_device *spi, u32 frequency);
int rf69_enable_amplifier(struct spi_device *spi, u8 amplifier_mask);
--
2.16.2
Fixes checkpatch warning:
CHECK: Avoid CamelCase: <DIONumber>
Signed-off-by: Valentin Vidic <[email protected]>
---
drivers/staging/pi433/rf69.c | 4 ++--
drivers/staging/pi433/rf69.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c
index e11c9cca447b..e3394094f6a1 100644
--- a/drivers/staging/pi433/rf69.c
+++ b/drivers/staging/pi433/rf69.c
@@ -501,14 +501,14 @@ int rf69_set_ook_threshold_dec(struct spi_device *spi, enum threshold_decrement
}
}
-int rf69_set_dio_mapping(struct spi_device *spi, u8 DIONumber, u8 value)
+int rf69_set_dio_mapping(struct spi_device *spi, u8 dio_number, u8 value)
{
u8 mask;
u8 shift;
u8 dio_addr;
u8 dio_value;
- switch (DIONumber) {
+ switch (dio_number) {
case 0:
mask = MASK_DIO0; shift = SHIFT_DIO0; dio_addr = REG_DIOMAPPING1;
break;
diff --git a/drivers/staging/pi433/rf69.h b/drivers/staging/pi433/rf69.h
index ee22a10c85c0..4d6fc07f8255 100644
--- a/drivers/staging/pi433/rf69.h
+++ b/drivers/staging/pi433/rf69.h
@@ -41,7 +41,7 @@ int rf69_set_lna_gain(struct spi_device *spi, enum lnaGain lnaGain);
int rf69_set_bandwidth(struct spi_device *spi, enum mantisse mantisse, u8 exponent);
int rf69_set_bandwidth_during_afc(struct spi_device *spi, enum mantisse mantisse, u8 exponent);
int rf69_set_ook_threshold_dec(struct spi_device *spi, enum threshold_decrement threshold_decrement);
-int rf69_set_dio_mapping(struct spi_device *spi, u8 DIONumber, u8 value);
+int rf69_set_dio_mapping(struct spi_device *spi, u8 dio_number, u8 value);
bool rf69_get_flag(struct spi_device *spi, enum flag flag);
int rf69_set_rssi_threshold(struct spi_device *spi, u8 threshold);
int rf69_set_preamble_length(struct spi_device *spi, u16 preamble_length);
--
2.16.2
Fixes checkpatch warning:
CHECK: Avoid CamelCase: <preambleLength>
Signed-off-by: Valentin Vidic <[email protected]>
---
drivers/staging/pi433/rf69.c | 6 +++---
drivers/staging/pi433/rf69.h | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c
index e5c7e48a3b86..b2c54999b022 100644
--- a/drivers/staging/pi433/rf69.c
+++ b/drivers/staging/pi433/rf69.c
@@ -590,7 +590,7 @@ int rf69_set_rssi_threshold(struct spi_device *spi, u8 threshold)
return rf69_write_reg(spi, REG_RSSITHRESH, threshold);
}
-int rf69_set_preamble_length(struct spi_device *spi, u16 preambleLength)
+int rf69_set_preamble_length(struct spi_device *spi, u16 preamble_length)
{
int retval;
u8 msb, lsb;
@@ -598,8 +598,8 @@ int rf69_set_preamble_length(struct spi_device *spi, u16 preambleLength)
/* no value check needed - u16 exactly matches register size */
/* calculate reg settings */
- msb = (preambleLength & 0xff00) >> 8;
- lsb = (preambleLength & 0xff);
+ msb = (preamble_length & 0xff00) >> 8;
+ lsb = (preamble_length & 0xff);
/* transmit to chip */
retval = rf69_write_reg(spi, REG_PREAMBLE_MSB, msb);
diff --git a/drivers/staging/pi433/rf69.h b/drivers/staging/pi433/rf69.h
index d83808a5dd86..78366f251084 100644
--- a/drivers/staging/pi433/rf69.h
+++ b/drivers/staging/pi433/rf69.h
@@ -44,7 +44,7 @@ int rf69_set_ook_threshold_dec(struct spi_device *spi, enum threshold_decrement
int rf69_set_dio_mapping(struct spi_device *spi, u8 DIONumber, u8 value);
bool rf69_get_flag(struct spi_device *spi, enum flag flag);
int rf69_set_rssi_threshold(struct spi_device *spi, u8 threshold);
-int rf69_set_preamble_length(struct spi_device *spi, u16 preambleLength);
+int rf69_set_preamble_length(struct spi_device *spi, u16 preamble_length);
int rf69_enable_sync(struct spi_device *spi);
int rf69_disable_sync(struct spi_device *spi);
int rf69_set_fifo_fill_condition(struct spi_device *spi, enum fifo_fill_condition fifo_fill_condition);
--
2.16.2
Fixes checkpatch warnings:
CHECK: Avoid CamelCase: <normalMode>
CHECK: Avoid CamelCase: <improve4LowModulationIndex>
Signed-off-by: Valentin Vidic <[email protected]>
---
drivers/staging/pi433/Documentation/pi433.txt | 4 ++--
drivers/staging/pi433/rf69.c | 4 ++--
drivers/staging/pi433/rf69_enum.h | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/pi433/Documentation/pi433.txt b/drivers/staging/pi433/Documentation/pi433.txt
index 3bb38644eb6e..d0b7000faafc 100644
--- a/drivers/staging/pi433/Documentation/pi433.txt
+++ b/drivers/staging/pi433/Documentation/pi433.txt
@@ -215,9 +215,9 @@ rf params:
Allowd values: 0...7
dagc;
operation mode of the digital automatic gain control
- normalMode
+ normal_mode
improve
- improve4LowModulationIndex
+ improve_for_low_modulation_index
packet format:
enable_sync
diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c
index 0bc459e32f6b..5b0554823263 100644
--- a/drivers/staging/pi433/rf69.c
+++ b/drivers/staging/pi433/rf69.c
@@ -751,11 +751,11 @@ int rf69_set_fifo_threshold(struct spi_device *spi, u8 threshold)
int rf69_set_dagc(struct spi_device *spi, enum dagc dagc)
{
switch (dagc) {
- case normalMode:
+ case normal_mode:
return rf69_write_reg(spi, REG_TESTDAGC, DAGC_NORMAL);
case improve:
return rf69_write_reg(spi, REG_TESTDAGC, DAGC_IMPROVED_LOWBETA0);
- case improve4LowModulationIndex:
+ case improve_for_low_modulation_index:
return rf69_write_reg(spi, REG_TESTDAGC, DAGC_IMPROVED_LOWBETA1);
default:
dev_dbg(&spi->dev, "set: illegal input param");
diff --git a/drivers/staging/pi433/rf69_enum.h b/drivers/staging/pi433/rf69_enum.h
index eabaea99949d..493bd0025453 100644
--- a/drivers/staging/pi433/rf69_enum.h
+++ b/drivers/staging/pi433/rf69_enum.h
@@ -135,9 +135,9 @@ enum address_filtering {
};
enum dagc {
- normalMode,
+ normal_mode,
improve,
- improve4LowModulationIndex
+ improve_for_low_modulation_index
};
#endif
--
2.16.2
Fixes checkpatch warning:
CHECK: Avoid CamelCase: <lnaGain>
Signed-off-by: Valentin Vidic <[email protected]>
---
drivers/staging/pi433/Documentation/pi433.txt | 2 +-
drivers/staging/pi433/pi433_if.h | 2 +-
drivers/staging/pi433/rf69.c | 4 ++--
drivers/staging/pi433/rf69.h | 2 +-
drivers/staging/pi433/rf69_enum.h | 2 +-
5 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/pi433/Documentation/pi433.txt b/drivers/staging/pi433/Documentation/pi433.txt
index 79bccc586869..3bb38644eb6e 100644
--- a/drivers/staging/pi433/Documentation/pi433.txt
+++ b/drivers/staging/pi433/Documentation/pi433.txt
@@ -196,7 +196,7 @@ rf params:
sets the electrical adoption of the antenna
fifty_ohm - for antennas with an impedance of 50Ohm
two_hundred_ohm - for antennas with an impedance of 200Ohm
- lnaGain
+ lna_gain
sets the gain of the low noise amp
automatic - lna gain is determined by an agc
max - lna gain is set to maximum
diff --git a/drivers/staging/pi433/pi433_if.h b/drivers/staging/pi433/pi433_if.h
index be4a96055a97..b6e214c29ddf 100644
--- a/drivers/staging/pi433/pi433_if.h
+++ b/drivers/staging/pi433/pi433_if.h
@@ -117,7 +117,7 @@ struct pi433_rx_cfg {
__u8 rssi_threshold;
enum threshold_decrement threshold_decrement;
enum antenna_impedance antenna_impedance;
- enum lnaGain lna_gain;
+ enum lna_gain lna_gain;
enum mantisse bw_mantisse; /* normal: 0x50 */
__u8 bw_exponent; /* during AFC: 0x8b */
enum dagc dagc;
diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c
index e3394094f6a1..0bc459e32f6b 100644
--- a/drivers/staging/pi433/rf69.c
+++ b/drivers/staging/pi433/rf69.c
@@ -399,9 +399,9 @@ int rf69_set_antenna_impedance(struct spi_device *spi, enum antenna_impedance an
}
}
-int rf69_set_lna_gain(struct spi_device *spi, enum lnaGain lnaGain)
+int rf69_set_lna_gain(struct spi_device *spi, enum lna_gain lna_gain)
{
- switch (lnaGain) {
+ switch (lna_gain) {
case automatic:
return rf69_read_mod_write(spi, REG_LNA, MASK_LNA_GAIN, LNA_GAIN_AUTO);
case max:
diff --git a/drivers/staging/pi433/rf69.h b/drivers/staging/pi433/rf69.h
index 4d6fc07f8255..b9f6850e3316 100644
--- a/drivers/staging/pi433/rf69.h
+++ b/drivers/staging/pi433/rf69.h
@@ -37,7 +37,7 @@ int rf69_disable_amplifier(struct spi_device *spi, u8 amplifier_mask);
int rf69_set_output_power_level(struct spi_device *spi, u8 power_level);
int rf69_set_pa_ramp(struct spi_device *spi, enum pa_ramp pa_ramp);
int rf69_set_antenna_impedance(struct spi_device *spi, enum antenna_impedance antenna_impedance);
-int rf69_set_lna_gain(struct spi_device *spi, enum lnaGain lnaGain);
+int rf69_set_lna_gain(struct spi_device *spi, enum lna_gain lna_gain);
int rf69_set_bandwidth(struct spi_device *spi, enum mantisse mantisse, u8 exponent);
int rf69_set_bandwidth_during_afc(struct spi_device *spi, enum mantisse mantisse, u8 exponent);
int rf69_set_ook_threshold_dec(struct spi_device *spi, enum threshold_decrement threshold_decrement);
diff --git a/drivers/staging/pi433/rf69_enum.h b/drivers/staging/pi433/rf69_enum.h
index 5ac3d33a3d0c..eabaea99949d 100644
--- a/drivers/staging/pi433/rf69_enum.h
+++ b/drivers/staging/pi433/rf69_enum.h
@@ -65,7 +65,7 @@ enum antenna_impedance {
two_hundred_ohm
};
-enum lnaGain {
+enum lna_gain {
automatic,
max,
max_minus_6,
--
2.16.2
Fixes checkpatch warning:
CHECK: Avoid CamelCase: <syncSize>
Signed-off-by: Valentin Vidic <[email protected]>
---
drivers/staging/pi433/rf69.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c
index b2c54999b022..b57d3f4e9321 100644
--- a/drivers/staging/pi433/rf69.c
+++ b/drivers/staging/pi433/rf69.c
@@ -633,16 +633,16 @@ int rf69_set_fifo_fill_condition(struct spi_device *spi, enum fifo_fill_conditio
}
}
-int rf69_set_sync_size(struct spi_device *spi, u8 syncSize)
+int rf69_set_sync_size(struct spi_device *spi, u8 sync_size)
{
// check input value
- if (syncSize > 0x07) {
+ if (sync_size > 0x07) {
dev_dbg(&spi->dev, "set: illegal input param");
return -EINVAL;
}
// write value
- return rf69_read_mod_write(spi, REG_SYNC_CONFIG, MASK_SYNC_CONFIG_SYNC_SIZE, (syncSize << 3));
+ return rf69_read_mod_write(spi, REG_SYNC_CONFIG, MASK_SYNC_CONFIG_SYNC_SIZE, (sync_size << 3));
}
int rf69_set_sync_values(struct spi_device *spi, u8 sync_values[8])
--
2.16.2