diff options
author | Kari Argillander <kari.argillander@gmail.com> | 2017-12-13 00:02:11 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-12-13 13:00:31 +0100 |
commit | 9a38450ac3d1f665fdbe06a2fd2e06fcf70defbc (patch) | |
tree | 22ed1cc813819ed459c66d438ccdfdc551c59cea /drivers | |
parent | 2b3943b3c32df29445cfe82ea9254342d717ec43 (diff) | |
download | op-kernel-dev-9a38450ac3d1f665fdbe06a2fd2e06fcf70defbc.zip op-kernel-dev-9a38450ac3d1f665fdbe06a2fd2e06fcf70defbc.tar.gz |
staging: pi433: Fix disordered switch case
Case: SHAPING_0_5 is writing DATAMODUL_MODLATION_SHAPE_0_3 value and
vice versa
Signed-off-by: Kari Argillander <kari.argillander@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/pi433/rf69.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c index 0121186..f77ecd6 100644 --- a/drivers/staging/pi433/rf69.c +++ b/drivers/staging/pi433/rf69.c @@ -117,8 +117,8 @@ int rf69_set_modulation_shaping(struct spi_device *spi, switch (mod_shaping) { case SHAPING_OFF: return rf69_read_mod_write(spi, REG_DATAMODUL, MASK_DATAMODUL_MODULATION_SHAPE, DATAMODUL_MODULATION_SHAPE_NONE); case SHAPING_1_0: return rf69_read_mod_write(spi, REG_DATAMODUL, MASK_DATAMODUL_MODULATION_SHAPE, DATAMODUL_MODULATION_SHAPE_1_0); - case SHAPING_0_5: return rf69_read_mod_write(spi, REG_DATAMODUL, MASK_DATAMODUL_MODULATION_SHAPE, DATAMODUL_MODULATION_SHAPE_0_3); - case SHAPING_0_3: return rf69_read_mod_write(spi, REG_DATAMODUL, MASK_DATAMODUL_MODULATION_SHAPE, DATAMODUL_MODULATION_SHAPE_0_5); + case SHAPING_0_5: return rf69_read_mod_write(spi, REG_DATAMODUL, MASK_DATAMODUL_MODULATION_SHAPE, DATAMODUL_MODULATION_SHAPE_0_5); + case SHAPING_0_3: return rf69_read_mod_write(spi, REG_DATAMODUL, MASK_DATAMODUL_MODULATION_SHAPE, DATAMODUL_MODULATION_SHAPE_0_3); default: dev_dbg(&spi->dev, "set: illegal input param"); return -EINVAL; |