* [PATCH] irqchip/stm32: Make use of the helper function devm_platform_ioremap_resource()
@ 2021-09-08 10:57 Cai Huoqing
2021-10-20 18:47 ` [irqchip: irq/irqchip-next] " irqchip-bot for Cai Huoqing
0 siblings, 1 reply; 2+ messages in thread
From: Cai Huoqing @ 2021-09-08 10:57 UTC (permalink / raw)
To: caihuoqing
Cc: Thomas Gleixner, Marc Zyngier, Maxime Coquelin, Alexandre Torgue,
linux-kernel, linux-stm32, linux-arm-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-stm32-exti.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/irqchip/irq-stm32-exti.c b/drivers/irqchip/irq-stm32-exti.c
index 33c76710f845..b7cb2da71888 100644
--- a/drivers/irqchip/irq-stm32-exti.c
+++ b/drivers/irqchip/irq-stm32-exti.c
@@ -850,7 +850,6 @@ static int stm32_exti_probe(struct platform_device *pdev)
struct irq_domain *parent_domain, *domain;
struct stm32_exti_host_data *host_data;
const struct stm32_exti_drv_data *drv_data;
- struct resource *res;
host_data = devm_kzalloc(dev, sizeof(*host_data), GFP_KERNEL);
if (!host_data)
@@ -888,8 +887,7 @@ static int stm32_exti_probe(struct platform_device *pdev)
if (!host_data->chips_data)
return -ENOMEM;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- host_data->base = devm_ioremap_resource(dev, res);
+ host_data->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(host_data->base))
return PTR_ERR(host_data->base);
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [irqchip: irq/irqchip-next] irqchip/stm32: Make use of the helper function devm_platform_ioremap_resource()
2021-09-08 10:57 [PATCH] irqchip/stm32: Make use of the helper function devm_platform_ioremap_resource() Cai Huoqing
@ 2021-10-20 18:47 ` irqchip-bot for Cai Huoqing
0 siblings, 0 replies; 2+ messages in thread
From: irqchip-bot for Cai Huoqing @ 2021-10-20 18:47 UTC (permalink / raw)
To: linux-kernel; +Cc: Cai Huoqing, Marc Zyngier, tglx
The following commit has been merged into the irq/irqchip-next branch of irqchip:
Commit-ID: fd9ac236c2536863800a7c9ecc73d2ea1bdfc128
Gitweb: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/fd9ac236c2536863800a7c9ecc73d2ea1bdfc128
Author: Cai Huoqing <caihuoqing@baidu.com>
AuthorDate: Wed, 08 Sep 2021 18:57:15 +08:00
Committer: Marc Zyngier <maz@kernel.org>
CommitterDate: Tue, 19 Oct 2021 11:24:05 +01:00
irqchip/stm32: 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>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210908105715.1780-1-caihuoqing@baidu.com
---
drivers/irqchip/irq-stm32-exti.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/irqchip/irq-stm32-exti.c b/drivers/irqchip/irq-stm32-exti.c
index 33c7671..b7cb2da 100644
--- a/drivers/irqchip/irq-stm32-exti.c
+++ b/drivers/irqchip/irq-stm32-exti.c
@@ -850,7 +850,6 @@ static int stm32_exti_probe(struct platform_device *pdev)
struct irq_domain *parent_domain, *domain;
struct stm32_exti_host_data *host_data;
const struct stm32_exti_drv_data *drv_data;
- struct resource *res;
host_data = devm_kzalloc(dev, sizeof(*host_data), GFP_KERNEL);
if (!host_data)
@@ -888,8 +887,7 @@ static int stm32_exti_probe(struct platform_device *pdev)
if (!host_data->chips_data)
return -ENOMEM;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- host_data->base = devm_ioremap_resource(dev, res);
+ host_data->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(host_data->base))
return PTR_ERR(host_data->base);
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-10-20 18:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-08 10:57 [PATCH] irqchip/stm32: Make use of the helper function devm_platform_ioremap_resource() Cai Huoqing
2021-10-20 18:47 ` [irqchip: irq/irqchip-next] " irqchip-bot for Cai Huoqing
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).