diff options
author | Shengzhou Liu <Shengzhou.Liu@freescale.com> | 2012-03-21 14:09:10 +0800 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2012-03-29 16:34:57 +0800 |
commit | a0ea0f6d17a6f14319069b039b7a9ebf54009678 (patch) | |
tree | b93604fcb422863fb01b60c38f0b3cc709eaa821 /drivers/crypto/caam/caamalg.c | |
parent | 6a76a6992341faab0ef31e7d97000e0cf336d0ba (diff) | |
download | lwn-a0ea0f6d17a6f14319069b039b7a9ebf54009678.tar.gz lwn-a0ea0f6d17a6f14319069b039b7a9ebf54009678.zip |
crypto: caam - add backward compatible string sec4.0
In some device trees of previous version, there were string "fsl,sec4.0".
To be backward compatible with device trees, we have CAAM driver first
check "fsl,sec-v4.0", if it fails, then check for "fsl,sec4.0".
Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
Acked-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/caam/caamalg.c')
-rw-r--r-- | drivers/crypto/caam/caamalg.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/crypto/caam/caamalg.c b/drivers/crypto/caam/caamalg.c index 534a36469d57..4eec389184d3 100644 --- a/drivers/crypto/caam/caamalg.c +++ b/drivers/crypto/caam/caamalg.c @@ -2267,8 +2267,11 @@ static void __exit caam_algapi_exit(void) int i, err; dev_node = of_find_compatible_node(NULL, NULL, "fsl,sec-v4.0"); - if (!dev_node) - return; + if (!dev_node) { + dev_node = of_find_compatible_node(NULL, NULL, "fsl,sec4.0"); + if (!dev_node) + return; + } pdev = of_find_device_by_node(dev_node); if (!pdev) @@ -2350,8 +2353,11 @@ static int __init caam_algapi_init(void) int i = 0, err = 0; dev_node = of_find_compatible_node(NULL, NULL, "fsl,sec-v4.0"); - if (!dev_node) - return -ENODEV; + if (!dev_node) { + dev_node = of_find_compatible_node(NULL, NULL, "fsl,sec4.0"); + if (!dev_node) + return -ENODEV; + } pdev = of_find_device_by_node(dev_node); if (!pdev) |