diff options
author | LEROY Christophe <christophe.leroy@c-s.fr> | 2017-10-06 15:04:51 +0200 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2017-10-12 22:55:30 +0800 |
commit | fa14c6cfcecb0011d53d77c5deb94b70d3738c44 (patch) | |
tree | d2a6d20bfb1dbdbe0c5f1185a582a623b1ec9df8 /drivers/crypto/talitos.c | |
parent | 24b92ff276e8f6b5c20f6c14ae483299685b887d (diff) | |
download | linux-stable-fa14c6cfcecb0011d53d77c5deb94b70d3738c44.tar.gz linux-stable-fa14c6cfcecb0011d53d77c5deb94b70d3738c44.tar.bz2 linux-stable-fa14c6cfcecb0011d53d77c5deb94b70d3738c44.zip |
crypto: talitos - use of_property_read_u32()
Use of_property_read_u32() to simplify DT read
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/talitos.c')
-rw-r--r-- | drivers/crypto/talitos.c | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c index 2a53d0f2a869..f139a0cef2e2 100644 --- a/drivers/crypto/talitos.c +++ b/drivers/crypto/talitos.c @@ -3158,7 +3158,6 @@ static int talitos_probe(struct platform_device *ofdev) struct device *dev = &ofdev->dev; struct device_node *np = ofdev->dev.of_node; struct talitos_private *priv; - const unsigned int *prop; int i, err; int stride; @@ -3182,21 +3181,11 @@ static int talitos_probe(struct platform_device *ofdev) } /* get SEC version capabilities from device tree */ - prop = of_get_property(np, "fsl,num-channels", NULL); - if (prop) - priv->num_channels = *prop; - - prop = of_get_property(np, "fsl,channel-fifo-len", NULL); - if (prop) - priv->chfifo_len = *prop; - - prop = of_get_property(np, "fsl,exec-units-mask", NULL); - if (prop) - priv->exec_units = *prop; - - prop = of_get_property(np, "fsl,descriptor-types-mask", NULL); - if (prop) - priv->desc_types = *prop; + of_property_read_u32(np, "fsl,num-channels", &priv->num_channels); + of_property_read_u32(np, "fsl,channel-fifo-len", &priv->chfifo_len); + of_property_read_u32(np, "fsl,exec-units-mask", &priv->exec_units); + of_property_read_u32(np, "fsl,descriptor-types-mask", + &priv->desc_types); if (!is_power_of_2(priv->num_channels) || !priv->chfifo_len || !priv->exec_units || !priv->desc_types) { |