Browse Source

staging: pi433: Fixes issue with bit shift in rf69_get_modulation

Fixes issue with bit shift in rf69_get_modulation

Signed-off-by: Marcus Wolf <linux@wolf-entwicklungen.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Marcus Wolf 7 years ago
parent
commit
202fc673c6
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/staging/pi433/rf69.c

+ 1 - 1
drivers/staging/pi433/rf69.c

@@ -102,7 +102,7 @@ enum modulation rf69_get_modulation(struct spi_device *spi)
 
 	currentValue = READ_REG(REG_DATAMODUL);
 
-	switch (currentValue & MASK_DATAMODUL_MODULATION_TYPE >> 3) { // TODO improvement: change 3 to define
+	switch (currentValue & MASK_DATAMODUL_MODULATION_TYPE) {
 	case DATAMODUL_MODULATION_TYPE_OOK: return OOK;
 	case DATAMODUL_MODULATION_TYPE_FSK: return FSK;
 	default:			    return undefined;