linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 8/8] pata: imx: Use devm_platform_get_and_ioremap_resource()
       [not found] <20230706124239.23366-1-frank.li@vivo.com>
@ 2023-07-06 12:42 ` Yangtao Li
  2023-07-06 21:21   ` Sergey Shtylyov
  2023-07-06 23:40   ` Damien Le Moal
  0 siblings, 2 replies; 3+ messages in thread
From: Yangtao Li @ 2023-07-06 12:42 UTC (permalink / raw)
  To: Sergey Shtylyov, Damien Le Moal, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team
  Cc: Yangtao Li, linux-ide, 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/ata/pata_imx.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/ata/pata_imx.c b/drivers/ata/pata_imx.c
index 4013f28679a9..65d09ec94c12 100644
--- a/drivers/ata/pata_imx.c
+++ b/drivers/ata/pata_imx.c
@@ -164,8 +164,7 @@ static int pata_imx_probe(struct platform_device *pdev)
 	ap->pio_mask = ATA_PIO4;
 	ap->flags |= ATA_FLAG_SLAVE_POSS;
 
-	io_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	priv->host_regs = devm_ioremap_resource(&pdev->dev, io_res);
+	priv->host_regs = devm_platform_get_and_ioremap_resource(pdev, 0, &io_res);
 	if (IS_ERR(priv->host_regs)) {
 		ret = PTR_ERR(priv->host_regs);
 		goto err;
-- 
2.39.0


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

* Re: [PATCH 8/8] pata: imx: Use devm_platform_get_and_ioremap_resource()
  2023-07-06 12:42 ` [PATCH 8/8] pata: imx: Use devm_platform_get_and_ioremap_resource() Yangtao Li
@ 2023-07-06 21:21   ` Sergey Shtylyov
  2023-07-06 23:40   ` Damien Le Moal
  1 sibling, 0 replies; 3+ messages in thread
From: Sergey Shtylyov @ 2023-07-06 21:21 UTC (permalink / raw)
  To: Yangtao Li, Damien Le Moal, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team
  Cc: linux-ide, linux-arm-kernel, linux-kernel

On 7/6/23 3:42 PM, 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>

Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>

[...]

MBR, Sergey

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

* Re: [PATCH 8/8] pata: imx: Use devm_platform_get_and_ioremap_resource()
  2023-07-06 12:42 ` [PATCH 8/8] pata: imx: Use devm_platform_get_and_ioremap_resource() Yangtao Li
  2023-07-06 21:21   ` Sergey Shtylyov
@ 2023-07-06 23:40   ` Damien Le Moal
  1 sibling, 0 replies; 3+ messages in thread
From: Damien Le Moal @ 2023-07-06 23:40 UTC (permalink / raw)
  To: Yangtao Li, Sergey Shtylyov, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team
  Cc: linux-ide, linux-arm-kernel, linux-kernel

On 7/6/23 21: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.

Patch title:

ata: pata_imx: ...

> 
> Signed-off-by: Yangtao Li <frank.li@vivo.com>
> ---
>  drivers/ata/pata_imx.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/ata/pata_imx.c b/drivers/ata/pata_imx.c
> index 4013f28679a9..65d09ec94c12 100644
> --- a/drivers/ata/pata_imx.c
> +++ b/drivers/ata/pata_imx.c
> @@ -164,8 +164,7 @@ static int pata_imx_probe(struct platform_device *pdev)
>  	ap->pio_mask = ATA_PIO4;
>  	ap->flags |= ATA_FLAG_SLAVE_POSS;
>  
> -	io_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	priv->host_regs = devm_ioremap_resource(&pdev->dev, io_res);
> +	priv->host_regs = devm_platform_get_and_ioremap_resource(pdev, 0, &io_res);
>  	if (IS_ERR(priv->host_regs)) {
>  		ret = PTR_ERR(priv->host_regs);
>  		goto err;

-- 
Damien Le Moal
Western Digital Research


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

end of thread, other threads:[~2023-07-06 23:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20230706124239.23366-1-frank.li@vivo.com>
2023-07-06 12:42 ` [PATCH 8/8] pata: imx: Use devm_platform_get_and_ioremap_resource() Yangtao Li
2023-07-06 21:21   ` Sergey Shtylyov
2023-07-06 23:40   ` Damien Le Moal

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).