diff options
author | Paulo Miguel Almeida <paulo.miguel.almeida.rodenas@gmail.com> | 2022-03-08 11:09:42 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-03-14 20:31:24 +0300 |
commit | 378c64302afe543ba6cedcbc696c08395e75aba4 (patch) | |
tree | 6d6898c81700c5f5316d6736f7279d772201a301 /drivers/staging | |
parent | cb9d439002263efbc99814cc8439fe65d805cfb2 (diff) | |
download | linux-378c64302afe543ba6cedcbc696c08395e75aba4.tar.xz |
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>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/pi433/rf69.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c index 3028018f0b45..659c8c1b38fd 100644 --- a/drivers/staging/pi433/rf69.c +++ b/drivers/staging/pi433/rf69.c @@ -741,7 +741,7 @@ int rf69_set_fifo_threshold(struct spi_device *spi, u8 threshold) int retval; /* check input value */ - if (threshold & 0x80) { + if (threshold & ~MASK_FIFO_THRESH_VALUE) { dev_dbg(&spi->dev, "set: illegal fifo threshold %u\n", threshold); return -EINVAL; } |