From: claudiu beznea <claudiu.beznea@tuxon.dev>
To: Yangtao Li <frank.li@vivo.com>,
Cristian Birsan <cristian.birsan@microchip.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Nicolas Ferre <nicolas.ferre@microchip.com>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Claudiu Beznea <claudiu.beznea@microchip.com>
Cc: linux-arm-kernel@lists.infradead.org, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 08/30] usb: gadget/atmel_usba_udc: Use devm_platform_get_and_ioremap_resource()
Date: Thu, 27 Jul 2023 08:34:13 +0300 [thread overview]
Message-ID: <9887e7a5-2422-4ab1-baf8-6eb0e27c1314@tuxon.dev> (raw)
In-Reply-To: <20230726113816.888-8-frank.li@vivo.com>
On 26.07.2023 14:37, 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: Claudiu Beznea <claudiu.beznea@tuxon.dev>
> ---
> drivers/usb/gadget/udc/atmel_usba_udc.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/usb/gadget/udc/atmel_usba_udc.c b/drivers/usb/gadget/udc/atmel_usba_udc.c
> index 6c0ed3fa5eb1..02b1bef5e22e 100644
> --- a/drivers/usb/gadget/udc/atmel_usba_udc.c
> +++ b/drivers/usb/gadget/udc/atmel_usba_udc.c
> @@ -2285,15 +2285,13 @@ static int usba_udc_probe(struct platform_device *pdev)
> udc->gadget = usba_gadget_template;
> INIT_LIST_HEAD(&udc->gadget.ep_list);
>
> - res = platform_get_resource(pdev, IORESOURCE_MEM, CTRL_IOMEM_ID);
> - udc->regs = devm_ioremap_resource(&pdev->dev, res);
> + udc->regs = devm_platform_get_and_ioremap_resource(pdev, CTRL_IOMEM_ID, &res);
> if (IS_ERR(udc->regs))
> return PTR_ERR(udc->regs);
> dev_info(&pdev->dev, "MMIO registers at %pR mapped at %p\n",
> res, udc->regs);
>
> - res = platform_get_resource(pdev, IORESOURCE_MEM, FIFO_IOMEM_ID);
> - udc->fifo = devm_ioremap_resource(&pdev->dev, res);
> + udc->fifo = devm_platform_get_and_ioremap_resource(pdev, FIFO_IOMEM_ID, &res);
> if (IS_ERR(udc->fifo))
> return PTR_ERR(udc->fifo);
> dev_info(&pdev->dev, "FIFO at %pR mapped at %p\n", res, udc->fifo);
next prev parent reply other threads:[~2023-07-27 5:35 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-26 11:37 [PATCH 01/30] usb: ehci-npcm7xx: fix typo in npcm7xx_ehci_hcd_drv_probe() Yangtao Li
2023-07-26 11:37 ` [PATCH 02/30] usb: chipidea/core: Use devm_platform_get_and_ioremap_resource() Yangtao Li
2023-07-26 11:37 ` [PATCH 03/30] usb: ohci-at91: " Yangtao Li
2023-07-26 14:27 ` Alan Stern
2023-07-26 14:29 ` Alan Stern
2023-07-26 11:37 ` [PATCH 04/30] usb: ohci-at91: Remove redundant msg at probe time Yangtao Li
2023-07-27 5:35 ` claudiu beznea
2023-07-26 11:37 ` [PATCH 05/30] usb: gadget: udc: udc-xilinx: Use devm_platform_get_and_ioremap_resource() Yangtao Li
2023-07-26 11:37 ` [PATCH 06/30] usb: gadget: aspeed: " Yangtao Li
2023-07-26 11:37 ` [PATCH 07/30] usb: gadget/snps_udc_plat: " Yangtao Li
2023-07-26 11:37 ` [PATCH 08/30] usb: gadget/atmel_usba_udc: " Yangtao Li
2023-07-27 5:34 ` claudiu beznea [this message]
2023-07-27 12:20 ` Cristian.Birsan
2023-07-26 11:37 ` [PATCH 09/30] usb: gadget: aspeed_udc: Convert to devm_platform_ioremap_resource() Yangtao Li
2023-07-26 11:37 ` [PATCH 10/30] usb: ehci-atmel: Use devm_platform_get_and_ioremap_resource() Yangtao Li
2023-07-27 5:35 ` claudiu beznea
2023-07-26 11:37 ` [PATCH 11/30] usb: ehci-platform: " Yangtao Li
2023-07-26 11:37 ` [PATCH 12/30] usb: ehci-spear: " Yangtao Li
2023-07-26 11:37 ` [PATCH 13/30] usb: isp1362-hcd: " Yangtao Li
2023-07-26 11:38 ` [PATCH 14/30] usb: ohci-da8xx: " Yangtao Li
2023-07-26 11:38 ` [PATCH 15/30] usb: host: ohci-platform: " Yangtao Li
2023-07-26 11:38 ` [PATCH 16/30] usb: ehci-sh: " Yangtao Li
2023-07-26 11:38 ` [PATCH 17/30] usb: ohci-exynos: " Yangtao Li
2023-07-26 11:38 ` [PATCH 18/30] usb: ehci-npcm7xx: " Yangtao Li
2023-07-26 11:38 ` [PATCH 19/30] usb: ohci-nxp: " Yangtao Li
2023-07-26 11:38 ` [PATCH 20/30] usb: ehci-orion: " Yangtao Li
2023-07-26 11:38 ` [PATCH 21/30] usb: ehci-fsl: " Yangtao Li
2023-07-26 11:38 ` [PATCH 22/30] usb: oxu210hp-hcd: " Yangtao Li
2023-07-26 11:38 ` [PATCH 23/30] usb: ohci-pxa27x: " Yangtao Li
2023-07-26 11:38 ` [PATCH 24/30] usb: ehci-omap: " Yangtao Li
2023-07-26 11:38 ` [PATCH 25/30] usb: ohci-spear: " Yangtao Li
2023-07-26 11:38 ` [PATCH 26/30] usb: ehci-mv: " Yangtao Li
2023-07-26 11:38 ` [PATCH 27/30] usb: uhci-platform: " Yangtao Li
2023-07-26 11:38 ` [PATCH 28/30] usb: ehci-st: " Yangtao Li
2023-08-28 9:08 ` Patrice CHOTARD
2023-07-26 11:38 ` [PATCH 29/30] usb: ehci-exynos: " Yangtao Li
2023-07-27 0:46 ` Andi Shyti
2023-07-26 11:38 ` [PATCH 30/30] usb: ohci-st: " Yangtao Li
2023-08-28 9:08 ` Patrice CHOTARD
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9887e7a5-2422-4ab1-baf8-6eb0e27c1314@tuxon.dev \
--to=claudiu.beznea@tuxon.dev \
--cc=alexandre.belloni@bootlin.com \
--cc=claudiu.beznea@microchip.com \
--cc=cristian.birsan@microchip.com \
--cc=frank.li@vivo.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=nicolas.ferre@microchip.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox