* [PATCH 1/3] misc: atmel-ssc: Use devm_platform_get_and_ioremap_resource()
@ 2023-07-07 2:42 Yangtao Li
2023-07-07 2:42 ` [PATCH 2/3] misc/xilinx_sdfec: Convert to devm_platform_ioremap_resource() Yangtao Li
2023-07-07 2:42 ` [PATCH 3/3] misc: xilinx_tmr_manager: Use devm_platform_get_and_ioremap_resource() Yangtao Li
0 siblings, 2 replies; 5+ messages in thread
From: Yangtao Li @ 2023-07-07 2:42 UTC (permalink / raw)
To: Claudiu Beznea, Arnd Bergmann, Greg Kroah-Hartman, Nicolas Ferre,
Alexandre Belloni
Cc: Yangtao Li, linux-arm-kernel, linux-kernel
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: Yangtao Li <frank.li@vivo.com>
---
drivers/misc/atmel-ssc.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/misc/atmel-ssc.c b/drivers/misc/atmel-ssc.c
index 7f9f562d6433..ee590c4a1537 100644
--- a/drivers/misc/atmel-ssc.c
+++ b/drivers/misc/atmel-ssc.c
@@ -212,8 +212,7 @@ static int ssc_probe(struct platform_device *pdev)
of_property_read_bool(np, "atmel,clk-from-rk-pin");
}
- regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- ssc->regs = devm_ioremap_resource(&pdev->dev, regs);
+ ssc->regs = devm_platform_get_and_ioremap_resource(pdev, 0, ®s);
if (IS_ERR(ssc->regs))
return PTR_ERR(ssc->regs);
--
2.39.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/3] misc/xilinx_sdfec: Convert to devm_platform_ioremap_resource()
2023-07-07 2:42 [PATCH 1/3] misc: atmel-ssc: Use devm_platform_get_and_ioremap_resource() Yangtao Li
@ 2023-07-07 2:42 ` Yangtao Li
2023-07-07 6:21 ` Michal Simek
2023-07-07 2:42 ` [PATCH 3/3] misc: xilinx_tmr_manager: Use devm_platform_get_and_ioremap_resource() Yangtao Li
1 sibling, 1 reply; 5+ messages in thread
From: Yangtao Li @ 2023-07-07 2:42 UTC (permalink / raw)
To: Derek Kiernan, Dragan Cvetic, Arnd Bergmann, Greg Kroah-Hartman,
Michal Simek
Cc: Yangtao Li, linux-arm-kernel, linux-kernel
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
drivers/misc/xilinx_sdfec.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/misc/xilinx_sdfec.c b/drivers/misc/xilinx_sdfec.c
index 270ff4c5971a..0877c42fb8e7 100644
--- a/drivers/misc/xilinx_sdfec.c
+++ b/drivers/misc/xilinx_sdfec.c
@@ -1347,7 +1347,6 @@ static int xsdfec_probe(struct platform_device *pdev)
{
struct xsdfec_dev *xsdfec;
struct device *dev;
- struct resource *res;
int err;
bool irq_enabled = true;
@@ -1363,8 +1362,7 @@ static int xsdfec_probe(struct platform_device *pdev)
return err;
dev = xsdfec->dev;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- xsdfec->regs = devm_ioremap_resource(dev, res);
+ xsdfec->regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(xsdfec->regs)) {
err = PTR_ERR(xsdfec->regs);
goto err_xsdfec_dev;
--
2.39.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 3/3] misc: xilinx_tmr_manager: Use devm_platform_get_and_ioremap_resource()
2023-07-07 2:42 [PATCH 1/3] misc: atmel-ssc: Use devm_platform_get_and_ioremap_resource() Yangtao Li
2023-07-07 2:42 ` [PATCH 2/3] misc/xilinx_sdfec: Convert to devm_platform_ioremap_resource() Yangtao Li
@ 2023-07-07 2:42 ` Yangtao Li
2023-07-07 6:21 ` Michal Simek
1 sibling, 1 reply; 5+ messages in thread
From: Yangtao Li @ 2023-07-07 2:42 UTC (permalink / raw)
To: Appana Durga Kedareswara rao, Arnd Bergmann, Greg Kroah-Hartman,
Michal Simek
Cc: Yangtao Li, linux-arm-kernel, linux-kernel
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: Yangtao Li <frank.li@vivo.com>
---
drivers/misc/xilinx_tmr_manager.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/misc/xilinx_tmr_manager.c b/drivers/misc/xilinx_tmr_manager.c
index 0ef55e06d3a0..2e7a5f37a01f 100644
--- a/drivers/misc/xilinx_tmr_manager.c
+++ b/drivers/misc/xilinx_tmr_manager.c
@@ -170,8 +170,7 @@ static int xtmr_manager_probe(struct platform_device *pdev)
if (!xtmr_manager)
return -ENOMEM;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- xtmr_manager->regs = devm_ioremap_resource(&pdev->dev, res);
+ xtmr_manager->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
if (IS_ERR(xtmr_manager->regs))
return PTR_ERR(xtmr_manager->regs);
--
2.39.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 3/3] misc: xilinx_tmr_manager: Use devm_platform_get_and_ioremap_resource()
2023-07-07 2:42 ` [PATCH 3/3] misc: xilinx_tmr_manager: Use devm_platform_get_and_ioremap_resource() Yangtao Li
@ 2023-07-07 6:21 ` Michal Simek
0 siblings, 0 replies; 5+ messages in thread
From: Michal Simek @ 2023-07-07 6:21 UTC (permalink / raw)
To: Yangtao Li, Appana Durga Kedareswara rao, Arnd Bergmann,
Greg Kroah-Hartman
Cc: linux-arm-kernel, linux-kernel
On 7/7/23 04:42, Yangtao Li wrote:
> 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: Yangtao Li <frank.li@vivo.com>
> ---
> drivers/misc/xilinx_tmr_manager.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/misc/xilinx_tmr_manager.c b/drivers/misc/xilinx_tmr_manager.c
> index 0ef55e06d3a0..2e7a5f37a01f 100644
> --- a/drivers/misc/xilinx_tmr_manager.c
> +++ b/drivers/misc/xilinx_tmr_manager.c
> @@ -170,8 +170,7 @@ static int xtmr_manager_probe(struct platform_device *pdev)
> if (!xtmr_manager)
> return -ENOMEM;
>
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - xtmr_manager->regs = devm_ioremap_resource(&pdev->dev, res);
> + xtmr_manager->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
> if (IS_ERR(xtmr_manager->regs))
> return PTR_ERR(xtmr_manager->regs);
>
Reviewed-by: Michal Simek <michal.simek@amd.com>
Thanks,
M
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/3] misc/xilinx_sdfec: Convert to devm_platform_ioremap_resource()
2023-07-07 2:42 ` [PATCH 2/3] misc/xilinx_sdfec: Convert to devm_platform_ioremap_resource() Yangtao Li
@ 2023-07-07 6:21 ` Michal Simek
0 siblings, 0 replies; 5+ messages in thread
From: Michal Simek @ 2023-07-07 6:21 UTC (permalink / raw)
To: Yangtao Li, Derek Kiernan, Dragan Cvetic, Arnd Bergmann,
Greg Kroah-Hartman
Cc: linux-arm-kernel, linux-kernel
On 7/7/23 04:42, Yangtao Li wrote:
> Use devm_platform_ioremap_resource() to simplify code.
>
> Signed-off-by: Yangtao Li <frank.li@vivo.com>
> ---
> drivers/misc/xilinx_sdfec.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/misc/xilinx_sdfec.c b/drivers/misc/xilinx_sdfec.c
> index 270ff4c5971a..0877c42fb8e7 100644
> --- a/drivers/misc/xilinx_sdfec.c
> +++ b/drivers/misc/xilinx_sdfec.c
> @@ -1347,7 +1347,6 @@ static int xsdfec_probe(struct platform_device *pdev)
> {
> struct xsdfec_dev *xsdfec;
> struct device *dev;
> - struct resource *res;
> int err;
> bool irq_enabled = true;
>
> @@ -1363,8 +1362,7 @@ static int xsdfec_probe(struct platform_device *pdev)
> return err;
>
> dev = xsdfec->dev;
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - xsdfec->regs = devm_ioremap_resource(dev, res);
> + xsdfec->regs = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(xsdfec->regs)) {
> err = PTR_ERR(xsdfec->regs);
> goto err_xsdfec_dev;
Reviewed-by: Michal Simek <michal.simek@amd.com>
Thanks,
M
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-07-07 6:22 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-07 2:42 [PATCH 1/3] misc: atmel-ssc: Use devm_platform_get_and_ioremap_resource() Yangtao Li
2023-07-07 2:42 ` [PATCH 2/3] misc/xilinx_sdfec: Convert to devm_platform_ioremap_resource() Yangtao Li
2023-07-07 6:21 ` Michal Simek
2023-07-07 2:42 ` [PATCH 3/3] misc: xilinx_tmr_manager: Use devm_platform_get_and_ioremap_resource() Yangtao Li
2023-07-07 6:21 ` Michal Simek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®