staging: pi433: remove unused rf69_set_ook_threshold_step function
authorMarcin Ciupak <marcin.s.ciupak@gmail.com>
Wed, 20 Dec 2017 16:17:02 +0000 (16:17 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 21 Dec 2017 17:29:59 +0000 (18:29 +0100)
Function rf69_set_ook_threshold_step is unused and should be removed
along with type enum thresholdStep which was used only by that function.

Signed-off-by: Marcin Ciupak <marcin.s.ciupak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/pi433/rf69.c
drivers/staging/pi433/rf69.h
drivers/staging/pi433/rf69_enum.h

index 94a5c2553b91a89bb75094abd93ec9b5ab3db7fe..dcc73c8a74cffc0939a52abc170c6ac566090765 100644 (file)
@@ -473,23 +473,6 @@ int rf69_set_ook_threshold_type(struct spi_device *spi, enum thresholdType thres
        }
 }
 
-int rf69_set_ook_threshold_step(struct spi_device *spi, enum thresholdStep thresholdStep)
-{
-       switch (thresholdStep) {
-       case step_0_5db: return rf69_read_mod_write(spi, REG_OOKPEAK, MASK_OOKPEAK_THRESSTEP, OOKPEAK_THRESHSTEP_0_5_DB);
-       case step_1_0db: return rf69_read_mod_write(spi, REG_OOKPEAK, MASK_OOKPEAK_THRESSTEP, OOKPEAK_THRESHSTEP_1_0_DB);
-       case step_1_5db: return rf69_read_mod_write(spi, REG_OOKPEAK, MASK_OOKPEAK_THRESSTEP, OOKPEAK_THRESHSTEP_1_5_DB);
-       case step_2_0db: return rf69_read_mod_write(spi, REG_OOKPEAK, MASK_OOKPEAK_THRESSTEP, OOKPEAK_THRESHSTEP_2_0_DB);
-       case step_3_0db: return rf69_read_mod_write(spi, REG_OOKPEAK, MASK_OOKPEAK_THRESSTEP, OOKPEAK_THRESHSTEP_3_0_DB);
-       case step_4_0db: return rf69_read_mod_write(spi, REG_OOKPEAK, MASK_OOKPEAK_THRESSTEP, OOKPEAK_THRESHSTEP_4_0_DB);
-       case step_5_0db: return rf69_read_mod_write(spi, REG_OOKPEAK, MASK_OOKPEAK_THRESSTEP, OOKPEAK_THRESHSTEP_5_0_DB);
-       case step_6_0db: return rf69_read_mod_write(spi, REG_OOKPEAK, MASK_OOKPEAK_THRESSTEP, OOKPEAK_THRESHSTEP_6_0_DB);
-       default:
-               dev_dbg(&spi->dev, "set: illegal input param");
-               return -EINVAL;
-       }
-}
-
 int rf69_set_ook_threshold_dec(struct spi_device *spi, enum thresholdDecrement thresholdDecrement)
 {
        switch (thresholdDecrement) {
index 9133a7d4f61a1ae1ebd256ce2816189fca0ddae7..6e9152c76db76cd475bbeb7f5d1532b5139b414a 100644 (file)
@@ -44,7 +44,6 @@ int rf69_set_dc_cut_off_frequency_during_afc(struct spi_device *spi, enum dcc_pe
 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_type(struct spi_device *spi, enum thresholdType thresholdType);
-int rf69_set_ook_threshold_step(struct spi_device *spi, enum thresholdStep thresholdStep);
 int rf69_set_ook_threshold_dec(struct spi_device *spi, enum thresholdDecrement thresholdDecrement);
 int rf69_set_dio_mapping(struct spi_device *spi, u8 DIONumber, u8 value);
 bool rf69_get_flag(struct spi_device *spi, enum flag flag);
index f4b0a7823c931d7b160fbdaf802472b5e40e3b9e..b065c6beb16b691fa074fb8c57df181557edd952 100644 (file)
@@ -99,17 +99,6 @@ enum thresholdType {
        average
 };
 
-enum thresholdStep {
-       step_0_5db,
-       step_1_0db,
-       step_1_5db,
-       step_2_0db,
-       step_3_0db,
-       step_4_0db,
-       step_5_0db,
-       step_6_0db
-};
-
 enum thresholdDecrement {
        dec_every8th,
        dec_every4th,