Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: pi433: remove hardcoded mask value for easier readability

replace hardcoded value with the bitwise complement of the mask used to
extract value sent to rf69 chip.

Signed-off-by: Paulo Miguel Almeida <paulo.miguel.almeida.rodenas@gmail.com>
Link: https://lore.kernel.org/r/YicPRrH3HmpiTCxe@mail.google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Paulo Miguel Almeida and committed by
Greg Kroah-Hartman
378c6430 cb9d4390

+1 -1
+1 -1
drivers/staging/pi433/rf69.c
··· 741 741 int retval; 742 742 743 743 /* check input value */ 744 - if (threshold & 0x80) { 744 + if (threshold & ~MASK_FIFO_THRESH_VALUE) { 745 745 dev_dbg(&spi->dev, "set: illegal fifo threshold %u\n", threshold); 746 746 return -EINVAL; 747 747 }