staging: pi433: remove unused function
authorValentin Vidic <Valentin.Vidic@CARNet.hr>
Tue, 19 Dec 2017 14:56:23 +0000 (15:56 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 Dec 2017 15:05:54 +0000 (16:05 +0100)
As it turns out rf69_get_lna_gain is not used at all.

Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/pi433/rf69.c
drivers/staging/pi433/rf69.h

index d777e31688ad0d9c675982028911746fe9132afc..f58b925bb1dac6016b3cb7d91ddfde7605ec5ce3 100644 (file)
@@ -334,24 +334,6 @@ int rf69_set_lna_gain(struct spi_device *spi, enum lnaGain lnaGain)
        }
 }
 
-enum lnaGain rf69_get_lna_gain(struct spi_device *spi)
-{
-       u8 currentValue;
-
-       currentValue = rf69_read_reg(spi, REG_LNA);
-
-       switch (currentValue & MASK_LNA_CURRENT_GAIN >> 3) { // improvement: change 3 to define
-       case LNA_GAIN_AUTO:         return automatic;
-       case LNA_GAIN_MAX:          return max;
-       case LNA_GAIN_MAX_MINUS_6:  return maxMinus6;
-       case LNA_GAIN_MAX_MINUS_12: return maxMinus12;
-       case LNA_GAIN_MAX_MINUS_24: return maxMinus24;
-       case LNA_GAIN_MAX_MINUS_36: return maxMinus36;
-       case LNA_GAIN_MAX_MINUS_48: return maxMinus48;
-       default:                    return undefined;
-       }
-}
-
 int rf69_set_dc_cut_off_frequency_intern(struct spi_device *spi, u8 reg, enum dcc_percent dcc_percent)
 {
        switch (dcc_percent) {
index 079acbd8a36600f198c5f7e7e51cb52ce93bc469..e90228a0ca29d451da2ac30e9c679d8006c3c926 100644 (file)
@@ -39,7 +39,6 @@ int rf69_set_output_power_level(struct spi_device *spi, u8 powerLevel);
 int rf69_set_pa_ramp(struct spi_device *spi, enum paRamp paRamp);
 int rf69_set_antenna_impedance(struct spi_device *spi, enum antennaImpedance antennaImpedance);
 int rf69_set_lna_gain(struct spi_device *spi, enum lnaGain lnaGain);
-enum lnaGain rf69_get_lna_gain(struct spi_device *spi);
 int rf69_set_dc_cut_off_frequency_intern(struct spi_device *spi, u8 reg, enum dcc_percent dcc_percent);
 int rf69_set_dc_cut_off_frequency(struct spi_device *spi, enum dcc_percent dcc_percent);
 int rf69_set_dc_cut_off_frequency_during_afc(struct spi_device *spi, enum dcc_percent dcc_percent);