This patchset fixes several misuses of the define statement in rf69.h.
Duplicted defines.
Define in header instead of source file.
Unused define.
Using units.h macro to define frequency.
v2->v1:
- Fix grammer in commit messages.
- Use units.h macro to define frequency.
- Reorder patches to ensure no conflicts.
Shahar Avidar (5):
staging: pi433: Remove a duplicated FIFO_SIZE define
staging: pi433: Remove a duplicated F_OSC define
staging: pi433: Redefine F_OSC using units.h macro
staging: pi433: Remove the unused FREQUENCY define
staging: pi433: Move FIFO_THRESHOLD define to source file
drivers/staging/pi433/pi433_if.c | 1 +
drivers/staging/pi433/rf69.c | 4 ++--
drivers/staging/pi433/rf69.h | 4 ----
3 files changed, 3 insertions(+), 6 deletions(-)
base-commit: 455c5e12a3b7d08c2ab47b7dd54944901c69cdcd
--
2.34.1
F_OSC is already defined & only used by rf69.c source file.
Signed-off-by: Shahar Avidar <[email protected]>
---
drivers/staging/pi433/rf69.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/pi433/rf69.h b/drivers/staging/pi433/rf69.h
index 78fa0b8bab8b..52e43a909b03 100644
--- a/drivers/staging/pi433/rf69.h
+++ b/drivers/staging/pi433/rf69.h
@@ -12,7 +12,6 @@
#include "rf69_registers.h"
/* NOTE: Modifying FREQUENCY value impacts CE certification */
-#define F_OSC 32000000 /* Hz */
#define FREQUENCY 433920000 /* Hz */
#define FIFO_SIZE 66 /* bytes */
#define FIFO_THRESHOLD 15 /* bytes */
--
2.34.1
FIFO_SIZE is being used in both rf69.c & pi433_if.c source files.
It is also already defined in rf69.h header file.
Signed-off-by: Shahar Avidar <[email protected]>
---
drivers/staging/pi433/rf69.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c
index 8c7fab6a46bb..b3b8d1abd3eb 100644
--- a/drivers/staging/pi433/rf69.c
+++ b/drivers/staging/pi433/rf69.c
@@ -13,7 +13,6 @@
#include "rf69_registers.h"
#define F_OSC 32000000 /* in Hz */
-#define FIFO_SIZE 66 /* in byte */
/*-------------------------------------------------------------------------*/
--
2.34.1