All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] irqchip/irq-mvebu-pic: Make use of the helper function devm_platform_ioremap_resource()
@ 2021-09-08 10:57 ` Cai Huoqing
  0 siblings, 0 replies; 5+ messages in thread
From: Cai Huoqing @ 2021-09-08 10:57 UTC (permalink / raw)
  To: caihuoqing
  Cc: Andrew Lunn, Gregory Clement, Sebastian Hesselbarth,
	Thomas Gleixner, Marc Zyngier, linux-arm-kernel, linux-kernel

Use the devm_platform_ioremap_resource() helper instead of
calling platform_get_resource() and devm_ioremap_resource()
separately

Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
---
 drivers/irqchip/irq-mvebu-pic.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/irqchip/irq-mvebu-pic.c b/drivers/irqchip/irq-mvebu-pic.c
index dc1cee4b0fe1..870f9866b8da 100644
--- a/drivers/irqchip/irq-mvebu-pic.c
+++ b/drivers/irqchip/irq-mvebu-pic.c
@@ -121,14 +121,12 @@ static int mvebu_pic_probe(struct platform_device *pdev)
 	struct device_node *node = pdev->dev.of_node;
 	struct mvebu_pic *pic;
 	struct irq_chip *irq_chip;
-	struct resource *res;
 
 	pic = devm_kzalloc(&pdev->dev, sizeof(struct mvebu_pic), GFP_KERNEL);
 	if (!pic)
 		return -ENOMEM;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	pic->base = devm_ioremap_resource(&pdev->dev, res);
+	pic->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(pic->base))
 		return PTR_ERR(pic->base);
 
-- 
2.25.1


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

* [PATCH] irqchip/irq-mvebu-pic: Make use of the helper function devm_platform_ioremap_resource()
@ 2021-09-08 10:57 ` Cai Huoqing
  0 siblings, 0 replies; 5+ messages in thread
From: Cai Huoqing @ 2021-09-08 10:57 UTC (permalink / raw)
  To: caihuoqing
  Cc: Andrew Lunn, Gregory Clement, Sebastian Hesselbarth,
	Thomas Gleixner, Marc Zyngier, linux-arm-kernel, linux-kernel

Use the devm_platform_ioremap_resource() helper instead of
calling platform_get_resource() and devm_ioremap_resource()
separately

Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
---
 drivers/irqchip/irq-mvebu-pic.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/irqchip/irq-mvebu-pic.c b/drivers/irqchip/irq-mvebu-pic.c
index dc1cee4b0fe1..870f9866b8da 100644
--- a/drivers/irqchip/irq-mvebu-pic.c
+++ b/drivers/irqchip/irq-mvebu-pic.c
@@ -121,14 +121,12 @@ static int mvebu_pic_probe(struct platform_device *pdev)
 	struct device_node *node = pdev->dev.of_node;
 	struct mvebu_pic *pic;
 	struct irq_chip *irq_chip;
-	struct resource *res;
 
 	pic = devm_kzalloc(&pdev->dev, sizeof(struct mvebu_pic), GFP_KERNEL);
 	if (!pic)
 		return -ENOMEM;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	pic->base = devm_ioremap_resource(&pdev->dev, res);
+	pic->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(pic->base))
 		return PTR_ERR(pic->base);
 
-- 
2.25.1


_______________________________________________
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] 5+ messages in thread

* Re: [PATCH] irqchip/irq-mvebu-pic: Make use of the helper function devm_platform_ioremap_resource()
  2021-09-08 10:57 ` Cai Huoqing
@ 2021-09-08 12:24   ` Andrew Lunn
  -1 siblings, 0 replies; 5+ messages in thread
From: Andrew Lunn @ 2021-09-08 12:24 UTC (permalink / raw)
  To: Cai Huoqing
  Cc: Gregory Clement, Sebastian Hesselbarth, Thomas Gleixner,
	Marc Zyngier, linux-arm-kernel, linux-kernel

On Wed, Sep 08, 2021 at 06:57:00PM +0800, Cai Huoqing wrote:
> Use the devm_platform_ioremap_resource() helper instead of
> calling platform_get_resource() and devm_ioremap_resource()
> separately
> 
> Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

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

* Re: [PATCH] irqchip/irq-mvebu-pic: Make use of the helper function devm_platform_ioremap_resource()
@ 2021-09-08 12:24   ` Andrew Lunn
  0 siblings, 0 replies; 5+ messages in thread
From: Andrew Lunn @ 2021-09-08 12:24 UTC (permalink / raw)
  To: Cai Huoqing
  Cc: Gregory Clement, Sebastian Hesselbarth, Thomas Gleixner,
	Marc Zyngier, linux-arm-kernel, linux-kernel

On Wed, Sep 08, 2021 at 06:57:00PM +0800, Cai Huoqing wrote:
> Use the devm_platform_ioremap_resource() helper instead of
> calling platform_get_resource() and devm_ioremap_resource()
> separately
> 
> Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

_______________________________________________
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] 5+ messages in thread

* [irqchip: irq/irqchip-next] irqchip/irq-mvebu-pic: Make use of the helper function devm_platform_ioremap_resource()
  2021-09-08 10:57 ` Cai Huoqing
  (?)
  (?)
@ 2021-10-20 18:47 ` irqchip-bot for Cai Huoqing
  -1 siblings, 0 replies; 5+ messages in thread
From: irqchip-bot for Cai Huoqing @ 2021-10-20 18:47 UTC (permalink / raw)
  To: linux-kernel; +Cc: Cai Huoqing, Andrew Lunn, Marc Zyngier, tglx

The following commit has been merged into the irq/irqchip-next branch of irqchip:

Commit-ID:     bacdbd710de553c9c998235231139f0921a5750c
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/bacdbd710de553c9c998235231139f0921a5750c
Author:        Cai Huoqing <caihuoqing@baidu.com>
AuthorDate:    Wed, 08 Sep 2021 18:57:00 +08:00
Committer:     Marc Zyngier <maz@kernel.org>
CommitterDate: Tue, 19 Oct 2021 11:22:59 +01:00

irqchip/irq-mvebu-pic: Make use of the helper function devm_platform_ioremap_resource()

Use the devm_platform_ioremap_resource() helper instead of
calling platform_get_resource() and devm_ioremap_resource()
separately

Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210908105701.1678-1-caihuoqing@baidu.com
---
 drivers/irqchip/irq-mvebu-pic.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/irqchip/irq-mvebu-pic.c b/drivers/irqchip/irq-mvebu-pic.c
index dc1cee4..870f986 100644
--- a/drivers/irqchip/irq-mvebu-pic.c
+++ b/drivers/irqchip/irq-mvebu-pic.c
@@ -121,14 +121,12 @@ static int mvebu_pic_probe(struct platform_device *pdev)
 	struct device_node *node = pdev->dev.of_node;
 	struct mvebu_pic *pic;
 	struct irq_chip *irq_chip;
-	struct resource *res;
 
 	pic = devm_kzalloc(&pdev->dev, sizeof(struct mvebu_pic), GFP_KERNEL);
 	if (!pic)
 		return -ENOMEM;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	pic->base = devm_ioremap_resource(&pdev->dev, res);
+	pic->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(pic->base))
 		return PTR_ERR(pic->base);
 

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

end of thread, other threads:[~2021-10-20 18:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-08 10:57 [PATCH] irqchip/irq-mvebu-pic: Make use of the helper function devm_platform_ioremap_resource() Cai Huoqing
2021-09-08 10:57 ` Cai Huoqing
2021-09-08 12:24 ` Andrew Lunn
2021-09-08 12:24   ` Andrew Lunn
2021-10-20 18:47 ` [irqchip: irq/irqchip-next] " irqchip-bot for Cai Huoqing

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.