mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-17 09:14:19 +08:00
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>
This commit is contained in:
parent
aece090244
commit
202fc673c6
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user