* [PATCH -next] crypto: Use devm_platform_ioremap_resource()
@ 2023-02-20 12:39 Yang Li
2023-03-10 11:28 ` Herbert Xu
0 siblings, 1 reply; 2+ messages in thread
From: Yang Li @ 2023-02-20 12:39 UTC (permalink / raw)
To: davem
Cc: joel, andrew, neal_liu, herbert, linux-aspeed, linux-crypto,
linux-arm-kernel, linux-kernel, Yang Li
Convert platform_get_resource(), devm_ioremap_resource() to a single
call to Use devm_platform_ioremap_resource(), as this is exactly
what this function does.
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
drivers/crypto/aspeed/aspeed-acry.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/crypto/aspeed/aspeed-acry.c b/drivers/crypto/aspeed/aspeed-acry.c
index 1f77ebd73489..857a7a222922 100644
--- a/drivers/crypto/aspeed/aspeed-acry.c
+++ b/drivers/crypto/aspeed/aspeed-acry.c
@@ -712,7 +712,6 @@ static int aspeed_acry_probe(struct platform_device *pdev)
{
struct aspeed_acry_dev *acry_dev;
struct device *dev = &pdev->dev;
- struct resource *res;
int rc;
acry_dev = devm_kzalloc(dev, sizeof(struct aspeed_acry_dev),
@@ -724,13 +723,11 @@ static int aspeed_acry_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, acry_dev);
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- acry_dev->regs = devm_ioremap_resource(dev, res);
+ acry_dev->regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(acry_dev->regs))
return PTR_ERR(acry_dev->regs);
- res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
- acry_dev->acry_sram = devm_ioremap_resource(dev, res);
+ acry_dev->acry_sram = devm_platform_ioremap_resource(pdev, 1);
if (IS_ERR(acry_dev->acry_sram))
return PTR_ERR(acry_dev->acry_sram);
--
2.20.1.7.g153144c
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH -next] crypto: Use devm_platform_ioremap_resource()
2023-02-20 12:39 [PATCH -next] crypto: Use devm_platform_ioremap_resource() Yang Li
@ 2023-03-10 11:28 ` Herbert Xu
0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2023-03-10 11:28 UTC (permalink / raw)
To: Yang Li
Cc: davem, joel, andrew, neal_liu, linux-aspeed, linux-crypto,
linux-arm-kernel, linux-kernel
On Mon, Feb 20, 2023 at 08:39:21PM +0800, Yang Li wrote:
> Convert platform_get_resource(), devm_ioremap_resource() to a single
> call to Use devm_platform_ioremap_resource(), as this is exactly
> what this function does.
>
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
> ---
> drivers/crypto/aspeed/aspeed-acry.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
Patch applied. Thanks.
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-03-10 11:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-20 12:39 [PATCH -next] crypto: Use devm_platform_ioremap_resource() Yang Li
2023-03-10 11:28 ` Herbert Xu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome