Commit 378c6430 authored by Paulo Miguel Almeida's avatar Paulo Miguel Almeida Committed by Greg Kroah-Hartman

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: default avatarPaulo Miguel Almeida <paulo.miguel.almeida.rodenas@gmail.com>
Link: https://lore.kernel.org/r/YicPRrH3HmpiTCxe@mail.google.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent cb9d4390
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment