Thread (3 messages) flat view 3 messages, 3 authors, 2021-06-04

Re: [PATCH] hwrng: Add Arm SMCCC TRNG based driver

From: Mark Brown <broonie@kernel.org>
Date: 2021-06-04 17:14:53
Also in: linux-arm-kernel, lkml

On Fri, Jun 04, 2021 at 06:02:16PM +0100, Andre Przywara wrote:
+static int __init smccc_trng_dev_init(void)
+{
+	platform_device_register_simple("smccc_trng", -1, NULL, 0);
+
+	return 0;
+}
+
+device_initcall(smccc_trng_dev_init);
This will leave the device registered if the driver is removed and cause
the attempt to register the device again to fail if the module is
reloaded.  We don't check the error here but I'm not sure the driver
core won't complain about that and it's generally icky, better to clean
up the device on module removal.

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help