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
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 <[email protected]>
---
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
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 <[email protected]>
---
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
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 <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt