staging: pi433: fix CamelCase for GPIO functions
PATCH 1/7 staging: pi433: fix CamelCase for GPIO functions
Fixes checkpatch warnings:
CHECK: Avoid CamelCase: <setup_GPIOs>
CHECK: Avoid CamelCase: <free_GPIOs>
--- drivers/staging/pi433/pi433_if.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/staging/pi433/pi433_if.c +5 -5
@@ -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 ;
Signature · 6 lines
2.16.2 _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
PATCH 2/7 staging: pi433: fix CamelCase for preambleLength variable
Fixes checkpatch warning:
CHECK: Avoid CamelCase: <preambleLength>
--- drivers/staging/pi433/rf69.c | 6 +++--- drivers/staging/pi433/rf69.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/staging/pi433/rf69.c +3 -3
@@ -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);
drivers/staging/pi433/rf69.h +1 -1
@@ -44,7 +44,7 @@ int rf69_set_ook_threshold_dec(struct spi_device *spi, enum threshold_decrementint 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);
Signature · 6 lines
2.16.2 _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
PATCH 3/7 staging: pi433: fix CamelCase for syncSize variable
In reply to Valentin VidicFixes checkpatch warning:
CHECK: Avoid CamelCase: <syncSize>
--- drivers/staging/pi433/rf69.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/pi433/rf69.c +3 -3
@@ -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 ])
Signature · 6 lines
2.16.2 _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
PATCH 4/7 staging: pi433: fix CamelCase for bitRate variables
In reply to Valentin VidicFixes checkpatch warnings:
CHECK: Avoid CamelCase: <bitRate>
CHECK: Avoid CamelCase: <bitRate_min>
CHECK: Avoid CamelCase: <bitRate_reg>
--- drivers/staging/pi433/rf69.c | 16 ++++++++-------- drivers/staging/pi433/rf69.h | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-)
drivers/staging/pi433/rf69.c +8 -8
@@ -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);
drivers/staging/pi433/rf69.h +1 -1
@@ -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);
Signature · 6 lines
2.16.2 _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
PATCH 5/7 staging: pi433: fix CamelCase for DIONumber variable
In reply to Valentin VidicFixes checkpatch warning:
CHECK: Avoid CamelCase: <DIONumber>
--- drivers/staging/pi433/rf69.c | 4 ++-- drivers/staging/pi433/rf69.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/staging/pi433/rf69.c +2 -2
@@ -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 ;
drivers/staging/pi433/rf69.h +1 -1
@@ -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);
Signature · 6 lines
2.16.2 _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
PATCH 6/7 staging: pi433: fix CamelCase for lnaGain enum
In reply to Valentin VidicFixes checkpatch warning:
CHECK: Avoid CamelCase: <lnaGain>
--- 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(-)
drivers/staging/pi433/Documentation/pi433.txt +1 -1
@@ -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
drivers/staging/pi433/pi433_if.h +1 -1
@@ -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;
drivers/staging/pi433/rf69.c +2 -2
@@ -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:
drivers/staging/pi433/rf69.h +1 -1
@@ -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);
drivers/staging/pi433/rf69_enum.h +1 -1
@@ -65,7 +65,7 @@ enum antenna_impedance {two_hundred_ohm }; -enum lnaGain { +enum lna_gain { automatic, max, max_minus_6,
Signature · 6 lines
2.16.2 _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
PATCH 7/7 staging: pi433: fix CamelCase for dagc enum
In reply to Valentin VidicFixes checkpatch warnings:
CHECK: Avoid CamelCase: <normalMode>
CHECK: Avoid CamelCase: <improve4LowModulationIndex>
--- 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(-)
drivers/staging/pi433/Documentation/pi433.txt +2 -2
@@ -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
drivers/staging/pi433/rf69.c +2 -2
@@ -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" );
drivers/staging/pi433/rf69_enum.h +2 -2
@@ -135,9 +135,9 @@ enum address_filtering { };enum dagc { - normalMode, + normal_mode, improve, - improve4LowModulationIndex + improve_for_low_modulation_index };#endif
Signature · 6 lines
2.16.2 _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel