* [PATCH 0/2] hwrng: imx-rngc - two simple cleanups
@ 2023-05-19 16:11 Martin Kaiser
2023-05-19 16:11 ` [PATCH 1/2] hwrng: imx-rngc - mark the probe function as __init Martin Kaiser
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Martin Kaiser @ 2023-05-19 16:11 UTC (permalink / raw)
To: Herbert Xu; +Cc: linux-crypto, linux-arm-kernel, linux-kernel, Martin Kaiser
Here's two more simple cleanups for imx-rngc. We can drop .data = NULL in the
imx_rngc_dt_ids. And the probe function can be marked as __init as we don't
support hotplugging.
Martin Kaiser (2):
hwrng: imx-rngc - mark the probe function as __init
hwrng: imx-rngc - don't init of_device_id's data
drivers/char/hw_random/imx-rngc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--
2.30.2
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] hwrng: imx-rngc - mark the probe function as __init
2023-05-19 16:11 [PATCH 0/2] hwrng: imx-rngc - two simple cleanups Martin Kaiser
@ 2023-05-19 16:11 ` Martin Kaiser
2023-05-19 16:11 ` [PATCH 2/2] hwrng: imx-rngc - don't init of_device_id's data Martin Kaiser
2023-05-24 10:14 ` [PATCH 0/2] hwrng: imx-rngc - two simple cleanups Herbert Xu
2 siblings, 0 replies; 4+ messages in thread
From: Martin Kaiser @ 2023-05-19 16:11 UTC (permalink / raw)
To: Herbert Xu; +Cc: linux-crypto, linux-arm-kernel, linux-kernel, Martin Kaiser
Mark the imx_rngc_probe function as __init.
There's no need to support hotplugging in the imx-rngc driver. We use
module_platform_driver_probe, the probe function will only be called at
startup.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
drivers/char/hw_random/imx-rngc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/char/hw_random/imx-rngc.c b/drivers/char/hw_random/imx-rngc.c
index 9c6988c658e2..c807fdbd22ba 100644
--- a/drivers/char/hw_random/imx-rngc.c
+++ b/drivers/char/hw_random/imx-rngc.c
@@ -224,7 +224,7 @@ static void imx_rngc_cleanup(struct hwrng *rng)
imx_rngc_irq_mask_clear(rngc);
}
-static int imx_rngc_probe(struct platform_device *pdev)
+static int __init imx_rngc_probe(struct platform_device *pdev)
{
struct imx_rngc *rngc;
int ret;
--
2.30.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] hwrng: imx-rngc - don't init of_device_id's data
2023-05-19 16:11 [PATCH 0/2] hwrng: imx-rngc - two simple cleanups Martin Kaiser
2023-05-19 16:11 ` [PATCH 1/2] hwrng: imx-rngc - mark the probe function as __init Martin Kaiser
@ 2023-05-19 16:11 ` Martin Kaiser
2023-05-24 10:14 ` [PATCH 0/2] hwrng: imx-rngc - two simple cleanups Herbert Xu
2 siblings, 0 replies; 4+ messages in thread
From: Martin Kaiser @ 2023-05-19 16:11 UTC (permalink / raw)
To: Herbert Xu; +Cc: linux-crypto, linux-arm-kernel, linux-kernel, Martin Kaiser
We have no device-specific data for fsl,imx25-rngb. There's no need to
set .data = NULL, this is the default.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
drivers/char/hw_random/imx-rngc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/char/hw_random/imx-rngc.c b/drivers/char/hw_random/imx-rngc.c
index c807fdbd22ba..1a6a5dd0a5a1 100644
--- a/drivers/char/hw_random/imx-rngc.c
+++ b/drivers/char/hw_random/imx-rngc.c
@@ -321,7 +321,7 @@ static int __maybe_unused imx_rngc_resume(struct device *dev)
static SIMPLE_DEV_PM_OPS(imx_rngc_pm_ops, imx_rngc_suspend, imx_rngc_resume);
static const struct of_device_id imx_rngc_dt_ids[] = {
- { .compatible = "fsl,imx25-rngb", .data = NULL, },
+ { .compatible = "fsl,imx25-rngb" },
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(of, imx_rngc_dt_ids);
--
2.30.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 0/2] hwrng: imx-rngc - two simple cleanups
2023-05-19 16:11 [PATCH 0/2] hwrng: imx-rngc - two simple cleanups Martin Kaiser
2023-05-19 16:11 ` [PATCH 1/2] hwrng: imx-rngc - mark the probe function as __init Martin Kaiser
2023-05-19 16:11 ` [PATCH 2/2] hwrng: imx-rngc - don't init of_device_id's data Martin Kaiser
@ 2023-05-24 10:14 ` Herbert Xu
2 siblings, 0 replies; 4+ messages in thread
From: Herbert Xu @ 2023-05-24 10:14 UTC (permalink / raw)
To: Martin Kaiser; +Cc: linux-crypto, linux-arm-kernel, linux-kernel
On Fri, May 19, 2023 at 06:11:17PM +0200, Martin Kaiser wrote:
> Here's two more simple cleanups for imx-rngc. We can drop .data = NULL in the
> imx_rngc_dt_ids. And the probe function can be marked as __init as we don't
> support hotplugging.
>
> Martin Kaiser (2):
> hwrng: imx-rngc - mark the probe function as __init
> hwrng: imx-rngc - don't init of_device_id's data
>
> drivers/char/hw_random/imx-rngc.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> --
> 2.30.2
All applied. Thanks.
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-05-24 10:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-19 16:11 [PATCH 0/2] hwrng: imx-rngc - two simple cleanups Martin Kaiser
2023-05-19 16:11 ` [PATCH 1/2] hwrng: imx-rngc - mark the probe function as __init Martin Kaiser
2023-05-19 16:11 ` [PATCH 2/2] hwrng: imx-rngc - don't init of_device_id's data Martin Kaiser
2023-05-24 10:14 ` [PATCH 0/2] hwrng: imx-rngc - two simple cleanups Herbert Xu
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).