crypto: aspeed - Use devm_platform_get_and_ioremap_resource()
Subsystems (3)
PATCH 1/1 crypto: aspeed - Use devm_platform_get_and_ioremap_resource()
From: ye xingchen <[email protected]>
Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does.
Signed-off-by ye xingchen <[email protected]>
--- drivers/crypto/aspeed/aspeed-hace.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/crypto/aspeed/aspeed-hace.c +1 -4
@@ -99,7 +99,6 @@ static int aspeed_hace_probe(struct platform_device *pdev)const struct of_device_id *hace_dev_id;struct aspeed_engine_hash *hash_engine;struct aspeed_hace_dev *hace_dev; -struct resource *res;int rc; hace_dev = devm_kzalloc(&pdev->dev, sizeof(struct aspeed_hace_dev),
@@ -118,11 +117,9 @@ static int aspeed_hace_probe(struct platform_device *pdev) hash_engine = &hace_dev->hash_engine; crypto_engine = &hace_dev->crypto_engine; - res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); -platform_set_drvdata (pdev, hace_dev); - hace_dev->regs =devm_ioremap_resource (&pdev->dev, res); + hace_dev->regs =devm_platform_get_and_ioremap_resource (pdev,0 ,NULL );if (IS_ERR (hace_dev->regs))return PTR_ERR (hace_dev->regs);
Signature · 1 line
2.25.1
Herbert Xu
maintainerQuoted 10 lines · ye.xingchen at zte.com.cn
From: ye xingchen <[email protected]>
Convert
platform_get_resource(),devm_ioremap_resource()to a single call todevm_platform_get_and_ioremap_resource(), as this is exactly what this function does.Signed-off-by ye xingchen <[email protected]>--- drivers/crypto/aspeed/aspeed-hace.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
Patch applied. Thanks.
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt