[PATCH 04/12] hw_random: add struct hwrng::priv member

Ahmad Fatoum a.fatoum at pengutronix.de
Wed Mar 13 03:56:23 PDT 2024


A number of Linux hw_random drivers use container_of to arrive at the
driver private data, but some others use the priv member of struct
hwrng. A unsigned long worth of extra malloc space doesn't hurt, so add
the same member to barebox too.

Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
 include/linux/hw_random.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/linux/hw_random.h b/include/linux/hw_random.h
index 9143ba1f8d4c..4479428bc743 100644
--- a/include/linux/hw_random.h
+++ b/include/linux/hw_random.h
@@ -33,6 +33,7 @@ struct hwrng {
 	struct cdev cdev;
 	struct device *dev;
 	void *buf;
+	unsigned long priv;
 };
 
 /* Register a new Hardware Random Number Generator driver. */
-- 
2.39.2




More information about the barebox mailing list