From: Shahar Avidar <ikobh7@gmail.com>
To: gregkh@linuxfoundation.org, luca.ceresoli@bootlin.com,
benjamin.tissoires@redhat.com, elder@linaro.org,
andriy.shevchenko@linux.intel.com, robh@kernel.org
Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: [PATCH 3/5] staging: pi433: Redefine F_OSC using units.h macro
Date: Wed, 28 Feb 2024 00:10:41 +0200 [thread overview]
Message-ID: <20240227221043.532938-4-ikobh7@gmail.com> (raw)
In-Reply-To: <20240227221043.532938-1-ikobh7@gmail.com>
Use HZ_PER_MHZ for a more robust definition.
Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Shahar Avidar <ikobh7@gmail.com>
---
drivers/staging/pi433/rf69.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c
index b3b8d1abd3eb..5a1c362badb6 100644
--- a/drivers/staging/pi433/rf69.c
+++ b/drivers/staging/pi433/rf69.c
@@ -8,11 +8,12 @@
#include <linux/types.h>
#include <linux/spi/spi.h>
+#include <linux/units.h>
#include "rf69.h"
#include "rf69_registers.h"
-#define F_OSC 32000000 /* in Hz */
+#define F_OSC (32 * HZ_PER_MHZ)
/*-------------------------------------------------------------------------*/
--
2.34.1
next prev parent reply other threads:[~2024-02-27 22:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-27 22:10 [PATCH 0/5] Fix defines in rf69.h Shahar Avidar
2024-02-27 22:10 ` [PATCH 1/5] staging: pi433: Remove a duplicated FIFO_SIZE define Shahar Avidar
2024-02-27 22:10 ` [PATCH 2/5] staging: pi433: Remove a duplicated F_OSC define Shahar Avidar
2024-02-27 22:10 ` Shahar Avidar [this message]
2024-02-27 22:10 ` [PATCH 4/5] staging: pi433: Remove the unused FREQUENCY define Shahar Avidar
2024-02-27 22:10 ` [PATCH 5/5] staging: pi433: Move FIFO_THRESHOLD define to source file Shahar Avidar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240227221043.532938-4-ikobh7@gmail.com \
--to=ikobh7@gmail.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=benjamin.tissoires@redhat.com \
--cc=elder@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=luca.ceresoli@bootlin.com \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).