]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
staging: pi433: remove unused rf69_set_ook_threshold_type function
authorMarcin Ciupak <marcin.s.ciupak@gmail.com>
Wed, 20 Dec 2017 16:17:27 +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_type is unused and should be removed
along with type enum thresholdType 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 dcc73c8a74cffc0939a52abc170c6ac566090765..eb84257b51a93b87db6b7c94e6339565b34c83cd 100644 (file)
@@ -461,18 +461,6 @@ int rf69_set_bandwidth_during_afc(struct spi_device *spi, enum mantisse mantisse
        return rf69_set_bandwidth_intern(spi, REG_AFCBW, mantisse, exponent);
 }
 
-int rf69_set_ook_threshold_type(struct spi_device *spi, enum thresholdType thresholdType)
-{
-       switch (thresholdType) {
-       case fixed:     return rf69_read_mod_write(spi, REG_OOKPEAK, MASK_OOKPEAK_THRESTYPE, OOKPEAK_THRESHTYPE_FIXED);
-       case peak:      return rf69_read_mod_write(spi, REG_OOKPEAK, MASK_OOKPEAK_THRESTYPE, OOKPEAK_THRESHTYPE_PEAK);
-       case average:   return rf69_read_mod_write(spi, REG_OOKPEAK, MASK_OOKPEAK_THRESTYPE, OOKPEAK_THRESHTYPE_AVERAGE);
-       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 6e9152c76db76cd475bbeb7f5d1532b5139b414a..85ef6ea9f0f2f2324641a92ad248c2f7ff189b8b 100644 (file)
@@ -43,7 +43,6 @@ int rf69_set_dc_cut_off_frequency(struct spi_device *spi, enum dcc_percent dcc_p
 int rf69_set_dc_cut_off_frequency_during_afc(struct spi_device *spi, enum dcc_percent dcc_percent);
 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_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 b065c6beb16b691fa074fb8c57df181557edd952..446f6866566b257e9a6cef7cef7738f8eb72bdef 100644 (file)
@@ -93,12 +93,6 @@ enum mantisse {
        mantisse24
 };
 
-enum thresholdType {
-       fixed,
-       peak,
-       average
-};
-
 enum thresholdDecrement {
        dec_every8th,
        dec_every4th,