From 313ea293e9c4d1eabcaddd2c0800f083b03c2a2e Mon Sep 17 00:00:00 2001 From: Ruchika Gupta Date: Fri, 25 Oct 2013 12:01:01 +0530 Subject: crypto: caam - Add Platform driver for Job Ring The SEC Job Rings are now available as individual devices. This would enable sharing of job rings between kernel and user space. Job Rings can now be dynamically bound/unbound from kernel. Changes are made in the following layers of CAAM Driver 1. Controller driver - Does basic initialization of CAAM Block. - Creates platform devices for Job Rings. (Earlier the initialization of Job ring was done by the controller driver) 2. JobRing Platform driver - Manages the platform Job Ring devices created by the controller driver Signed-off-by: Ruchika Gupta Reviewed-by: Garg Vakul-B16394 Signed-off-by: Herbert Xu --- drivers/crypto/caam/caamrng.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'drivers/crypto/caam/caamrng.c') diff --git a/drivers/crypto/caam/caamrng.c b/drivers/crypto/caam/caamrng.c index 588ad2288f82..4e4ed155c5be 100644 --- a/drivers/crypto/caam/caamrng.c +++ b/drivers/crypto/caam/caamrng.c @@ -279,7 +279,7 @@ static void __exit caam_rng_exit(void) static int __init caam_rng_init(void) { struct device_node *dev_node; - struct platform_device *pdev; + struct platform_device *pdev, *jrpdev; struct device *ctrldev; struct caam_drv_private *priv; @@ -305,9 +305,10 @@ static int __init caam_rng_init(void) if (!priv) return -ENODEV; - caam_init_rng(&rng_ctx, priv->jrdev[0]); + jrpdev = priv->jrpdev[0]; + caam_init_rng(&rng_ctx, &jrpdev->dev); - dev_info(priv->jrdev[0], "registering rng-caam\n"); + dev_info(&jrpdev->dev, "registering rng-caam\n"); return hwrng_register(&caam_rng); } -- cgit v1.2.3