staging: pi433: change order in which driver config the rf69 chip
authorPaulo Miguel Almeida <paulo.miguel.almeida.rodenas@gmail.com>
Tue, 18 Jan 2022 23:05:02 +0000 (12:05 +1300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 25 Jan 2022 15:33:55 +0000 (16:33 +0100)
commit14dbdad1f1a142f2c5d5dde6f671c18ac6763e30
tree3d1ef7097f57d65d4cc34b9a6cb9b353f8b30ddc
parentd9dc6c1b440f837135af579c3caa4c27b0e0105b
staging: pi433: change order in which driver config the rf69 chip

There is an explicit dependency between modulation and bit rate
configurations. To ensure proper validation of input value for the
set_bit_rate routine, we must ensure that modulation has been set
before.

This patch ensures that set_modulation is always called before
set_bit_rate for both RX and TX routines

Acked-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Paulo Miguel Almeida <paulo.miguel.almeida.rodenas@gmail.com>
Link: https://lore.kernel.org/r/20220118230502.GA4897@mail.google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/pi433/pi433_if.c