linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] char: hw_random: imx-rngc: use devm_platform_ioremap_resource() to simplify code
@ 2019-07-17  9:04 Anson.Huang
  2019-07-17  9:04 ` [PATCH 2/2] char: hw_random: mxc-rnga: " Anson.Huang
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Anson.Huang @ 2019-07-17  9:04 UTC (permalink / raw)
  To: mpm, herbert, arnd, gregkh, shawnguo, s.hauer, kernel, festevam,
	rfontana, allison, kstewart, tglx, linux-crypto,
	linux-arm-kernel, linux-kernel
  Cc: Linux-imx

From: Anson Huang <Anson.Huang@nxp.com>

Use the new helper devm_platform_ioremap_resource() which wraps the
platform_get_resource() and devm_ioremap_resource() together, to
simplify the code.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
---
 drivers/char/hw_random/imx-rngc.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/char/hw_random/imx-rngc.c b/drivers/char/hw_random/imx-rngc.c
index 69f5379..30cf00f 100644
--- a/drivers/char/hw_random/imx-rngc.c
+++ b/drivers/char/hw_random/imx-rngc.c
@@ -196,7 +196,6 @@ static int imx_rngc_init(struct hwrng *rng)
 static int imx_rngc_probe(struct platform_device *pdev)
 {
 	struct imx_rngc *rngc;
-	struct resource *res;
 	int ret;
 	int irq;
 
@@ -204,8 +203,7 @@ static int imx_rngc_probe(struct platform_device *pdev)
 	if (!rngc)
 		return -ENOMEM;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	rngc->base = devm_ioremap_resource(&pdev->dev, res);
+	rngc->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(rngc->base))
 		return PTR_ERR(rngc->base);
 
-- 
2.7.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] char: hw_random: mxc-rnga: use devm_platform_ioremap_resource() to simplify code
  2019-07-17  9:04 [PATCH 1/2] char: hw_random: imx-rngc: use devm_platform_ioremap_resource() to simplify code Anson.Huang
@ 2019-07-17  9:04 ` Anson.Huang
  2019-07-17 10:24   ` Aisheng Dong
  2019-07-17 10:13 ` [PATCH 1/2] char: hw_random: imx-rngc: " Arnd Bergmann
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 6+ messages in thread
From: Anson.Huang @ 2019-07-17  9:04 UTC (permalink / raw)
  To: mpm, herbert, arnd, gregkh, shawnguo, s.hauer, kernel, festevam,
	rfontana, allison, kstewart, tglx, linux-crypto,
	linux-arm-kernel, linux-kernel
  Cc: Linux-imx

From: Anson Huang <Anson.Huang@nxp.com>

Use the new helper devm_platform_ioremap_resource() which wraps the
platform_get_resource() and devm_ioremap_resource() together, to
simplify the code.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
---
 drivers/char/hw_random/mxc-rnga.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/char/hw_random/mxc-rnga.c b/drivers/char/hw_random/mxc-rnga.c
index ea2bf18..025083c 100644
--- a/drivers/char/hw_random/mxc-rnga.c
+++ b/drivers/char/hw_random/mxc-rnga.c
@@ -134,7 +134,6 @@ static void mxc_rnga_cleanup(struct hwrng *rng)
 static int __init mxc_rnga_probe(struct platform_device *pdev)
 {
 	int err;
-	struct resource *res;
 	struct mxc_rng *mxc_rng;
 
 	mxc_rng = devm_kzalloc(&pdev->dev, sizeof(*mxc_rng), GFP_KERNEL);
@@ -158,8 +157,7 @@ static int __init mxc_rnga_probe(struct platform_device *pdev)
 	if (err)
 		return err;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	mxc_rng->mem = devm_ioremap_resource(&pdev->dev, res);
+	mxc_rng->mem = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(mxc_rng->mem)) {
 		err = PTR_ERR(mxc_rng->mem);
 		goto err_ioremap;
-- 
2.7.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] char: hw_random: imx-rngc: use devm_platform_ioremap_resource() to simplify code
  2019-07-17  9:04 [PATCH 1/2] char: hw_random: imx-rngc: use devm_platform_ioremap_resource() to simplify code Anson.Huang
  2019-07-17  9:04 ` [PATCH 2/2] char: hw_random: mxc-rnga: " Anson.Huang
@ 2019-07-17 10:13 ` Arnd Bergmann
  2019-07-17 10:24 ` Aisheng Dong
  2019-07-26 12:34 ` Herbert Xu
  3 siblings, 0 replies; 6+ messages in thread
From: Arnd Bergmann @ 2019-07-17 10:13 UTC (permalink / raw)
  To: Anson Huang
  Cc: Kate Stewart, Fabio Estevam, Herbert Xu, gregkh, Sascha Hauer,
	Linux Kernel Mailing List, Richard Fontana,
	open list:HARDWARE RANDOM NUMBER GENERATOR CORE, Sascha Hauer,
	Matt Mackall, Linux-imx, Thomas Gleixner, Shawn Guo, allison,
	Linux ARM

On Wed, Jul 17, 2019 at 11:14 AM <Anson.Huang@nxp.com> wrote:
>
> From: Anson Huang <Anson.Huang@nxp.com>
>
> Use the new helper devm_platform_ioremap_resource() which wraps the
> platform_get_resource() and devm_ioremap_resource() together, to
> simplify the code.
>
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>

Both patches

Acked-by: Arnd Bergmann <arnd@arndb.de>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH 1/2] char: hw_random: imx-rngc: use devm_platform_ioremap_resource() to simplify code
  2019-07-17  9:04 [PATCH 1/2] char: hw_random: imx-rngc: use devm_platform_ioremap_resource() to simplify code Anson.Huang
  2019-07-17  9:04 ` [PATCH 2/2] char: hw_random: mxc-rnga: " Anson.Huang
  2019-07-17 10:13 ` [PATCH 1/2] char: hw_random: imx-rngc: " Arnd Bergmann
@ 2019-07-17 10:24 ` Aisheng Dong
  2019-07-26 12:34 ` Herbert Xu
  3 siblings, 0 replies; 6+ messages in thread
From: Aisheng Dong @ 2019-07-17 10:24 UTC (permalink / raw)
  To: Anson Huang, mpm, herbert, arnd, gregkh, shawnguo, s.hauer,
	kernel, festevam, rfontana, allison, kstewart, tglx,
	linux-crypto, linux-arm-kernel, linux-kernel
  Cc: dl-linux-imx

> From: Anson.Huang@nxp.com <Anson.Huang@nxp.com>
> Sent: Wednesday, July 17, 2019 5:05 PM
> 
> Use the new helper devm_platform_ioremap_resource() which wraps the
> platform_get_resource() and devm_ioremap_resource() together, to simplify
> the code.
> 
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>

Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com>

Regards
Aisheng
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH 2/2] char: hw_random: mxc-rnga: use devm_platform_ioremap_resource() to simplify code
  2019-07-17  9:04 ` [PATCH 2/2] char: hw_random: mxc-rnga: " Anson.Huang
@ 2019-07-17 10:24   ` Aisheng Dong
  0 siblings, 0 replies; 6+ messages in thread
From: Aisheng Dong @ 2019-07-17 10:24 UTC (permalink / raw)
  To: Anson Huang, mpm, herbert, arnd, gregkh, shawnguo, s.hauer,
	kernel, festevam, rfontana, allison, kstewart, tglx,
	linux-crypto, linux-arm-kernel, linux-kernel
  Cc: dl-linux-imx

> From: Anson.Huang@nxp.com <Anson.Huang@nxp.com>
> Sent: Wednesday, July 17, 2019 5:05 PM
> 
> Use the new helper devm_platform_ioremap_resource() which wraps the
> platform_get_resource() and devm_ioremap_resource() together, to simplify
> the code.
> 
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>

Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com>

Regards
Aisheng
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] char: hw_random: imx-rngc: use devm_platform_ioremap_resource() to simplify code
  2019-07-17  9:04 [PATCH 1/2] char: hw_random: imx-rngc: use devm_platform_ioremap_resource() to simplify code Anson.Huang
                   ` (2 preceding siblings ...)
  2019-07-17 10:24 ` Aisheng Dong
@ 2019-07-26 12:34 ` Herbert Xu
  3 siblings, 0 replies; 6+ messages in thread
From: Herbert Xu @ 2019-07-26 12:34 UTC (permalink / raw)
  To: Anson.Huang
  Cc: kstewart, festevam, arnd, gregkh, s.hauer, linux-kernel,
	rfontana, linux-crypto, kernel, mpm, Linux-imx, tglx, shawnguo,
	allison, linux-arm-kernel

Anson.Huang@nxp.com wrote:
> From: Anson Huang <Anson.Huang@nxp.com>
> 
> Use the new helper devm_platform_ioremap_resource() which wraps the
> platform_get_resource() and devm_ioremap_resource() together, to
> simplify the code.
> 
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> ---
> drivers/char/hw_random/imx-rngc.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)

All 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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-07-26 12:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-17  9:04 [PATCH 1/2] char: hw_random: imx-rngc: use devm_platform_ioremap_resource() to simplify code Anson.Huang
2019-07-17  9:04 ` [PATCH 2/2] char: hw_random: mxc-rnga: " Anson.Huang
2019-07-17 10:24   ` Aisheng Dong
2019-07-17 10:13 ` [PATCH 1/2] char: hw_random: imx-rngc: " Arnd Bergmann
2019-07-17 10:24 ` Aisheng Dong
2019-07-26 12:34 ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).