* Re: [PATCH 29/30] usb: ehci-exynos: Use devm_platform_get_and_ioremap_resource() [not found] ` <20230726113816.888-29-frank.li@vivo.com> @ 2023-07-27 0:46 ` Andi Shyti 0 siblings, 0 replies; 7+ messages in thread From: Andi Shyti @ 2023-07-27 0:46 UTC (permalink / raw) To: Yangtao Li Cc: Alan Stern, Greg Kroah-Hartman, Krzysztof Kozlowski, Alim Akhtar, linux-usb, linux-arm-kernel, linux-samsung-soc, linux-kernel Hi Yangtao, On Wed, Jul 26, 2023 at 07:38:15PM +0800, 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: Andi Shyti <andi.shyti@kernel.org> Andi _______________________________________________ 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] 7+ messages in thread
[parent not found: <20230726113816.888-8-frank.li@vivo.com>]
* Re: [PATCH 08/30] usb: gadget/atmel_usba_udc: Use devm_platform_get_and_ioremap_resource() [not found] ` <20230726113816.888-8-frank.li@vivo.com> @ 2023-07-27 5:34 ` claudiu beznea 2023-07-27 12:20 ` Cristian.Birsan 0 siblings, 1 reply; 7+ messages in thread From: claudiu beznea @ 2023-07-27 5:34 UTC (permalink / raw) To: Yangtao Li, Cristian Birsan, Greg Kroah-Hartman, Nicolas Ferre, Alexandre Belloni, Claudiu Beznea Cc: linux-arm-kernel, linux-usb, linux-kernel 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); _______________________________________________ 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] 7+ messages in thread
* Re: [PATCH 08/30] usb: gadget/atmel_usba_udc: Use devm_platform_get_and_ioremap_resource() 2023-07-27 5:34 ` [PATCH 08/30] usb: gadget/atmel_usba_udc: " claudiu beznea @ 2023-07-27 12:20 ` Cristian.Birsan 0 siblings, 0 replies; 7+ messages in thread From: Cristian.Birsan @ 2023-07-27 12:20 UTC (permalink / raw) To: claudiu.beznea, frank.li, gregkh, Nicolas.Ferre, alexandre.belloni, Claudiu.Beznea Cc: linux-arm-kernel, linux-usb, linux-kernel On 7/27/23 08:34, claudiu beznea wrote: > > 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> Acked-by: Cristian Birsan <cristian.birsan@microchip.com> > >> --- >> 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); _______________________________________________ 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] 7+ messages in thread
[parent not found: <20230726113816.888-10-frank.li@vivo.com>]
* Re: [PATCH 10/30] usb: ehci-atmel: Use devm_platform_get_and_ioremap_resource() [not found] ` <20230726113816.888-10-frank.li@vivo.com> @ 2023-07-27 5:35 ` claudiu beznea 0 siblings, 0 replies; 7+ messages in thread From: claudiu beznea @ 2023-07-27 5:35 UTC (permalink / raw) To: Yangtao Li, Alan Stern, Greg Kroah-Hartman, Nicolas Ferre, Alexandre Belloni, Claudiu Beznea Cc: linux-usb, linux-arm-kernel, linux-kernel 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/host/ehci-atmel.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/usb/host/ehci-atmel.c b/drivers/usb/host/ehci-atmel.c > index 61808c51e702..e14b66d848ee 100644 > --- a/drivers/usb/host/ehci-atmel.c > +++ b/drivers/usb/host/ehci-atmel.c > @@ -122,8 +122,7 @@ static int ehci_atmel_drv_probe(struct platform_device *pdev) > } > atmel_ehci = hcd_to_atmel_ehci_priv(hcd); > > - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - hcd->regs = devm_ioremap_resource(&pdev->dev, res); > + hcd->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &res); > if (IS_ERR(hcd->regs)) { > retval = PTR_ERR(hcd->regs); > goto fail_request_resource; _______________________________________________ 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] 7+ messages in thread
[parent not found: <20230726113816.888-4-frank.li@vivo.com>]
* Re: [PATCH 04/30] usb: ohci-at91: Remove redundant msg at probe time [not found] ` <20230726113816.888-4-frank.li@vivo.com> @ 2023-07-27 5:35 ` claudiu beznea 0 siblings, 0 replies; 7+ messages in thread From: claudiu beznea @ 2023-07-27 5:35 UTC (permalink / raw) To: Yangtao Li, Alan Stern, Greg Kroah-Hartman, Nicolas Ferre, Alexandre Belloni, Claudiu Beznea Cc: linux-usb, linux-arm-kernel, linux-kernel On 26.07.2023 14:37, Yangtao Li wrote: > platform_get_irq() directly prints error information. > > Signed-off-by: Yangtao Li <frank.li@vivo.com> Reviewed-by: Claudiu Beznea <claudiu.beznea@tuxon.dev> > --- > drivers/usb/host/ohci-at91.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c > index f957d008f360..439d8a16d7c5 100644 > --- a/drivers/usb/host/ohci-at91.c > +++ b/drivers/usb/host/ohci-at91.c > @@ -190,10 +190,8 @@ static int usb_hcd_at91_probe(const struct hc_driver *driver, > int irq; > > irq = platform_get_irq(pdev, 0); > - if (irq < 0) { > - dev_dbg(dev, "hcd probe: missing irq resource\n"); > + if (irq < 0) > return irq; > - } > > hcd = usb_create_hcd(driver, dev, "at91"); > if (!hcd) _______________________________________________ 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] 7+ messages in thread
[parent not found: <20230726113816.888-28-frank.li@vivo.com>]
* Re: [PATCH 28/30] usb: ehci-st: Use devm_platform_get_and_ioremap_resource() [not found] ` <20230726113816.888-28-frank.li@vivo.com> @ 2023-08-28 9:08 ` Patrice CHOTARD 0 siblings, 0 replies; 7+ messages in thread From: Patrice CHOTARD @ 2023-08-28 9:08 UTC (permalink / raw) To: Yangtao Li, Alan Stern, Greg Kroah-Hartman Cc: linux-usb, linux-arm-kernel, linux-kernel On 7/26/23 13:38, 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/usb/host/ehci-st.c | 12 +++--------- > 1 file changed, 3 insertions(+), 9 deletions(-) > > diff --git a/drivers/usb/host/ehci-st.c b/drivers/usb/host/ehci-st.c > index ee0976b815b4..2dbb0d86daaa 100644 > --- a/drivers/usb/host/ehci-st.c > +++ b/drivers/usb/host/ehci-st.c > @@ -158,11 +158,6 @@ static int st_ehci_platform_probe(struct platform_device *dev) > irq = platform_get_irq(dev, 0); > if (irq < 0) > return irq; > - res_mem = platform_get_resource(dev, IORESOURCE_MEM, 0); > - if (!res_mem) { > - dev_err(&dev->dev, "no memory resource provided"); > - return -ENXIO; > - } > > hcd = usb_create_hcd(&ehci_platform_hc_driver, &dev->dev, > dev_name(&dev->dev)); > @@ -222,14 +217,13 @@ static int st_ehci_platform_probe(struct platform_device *dev) > goto err_put_clks; > } > > - hcd->rsrc_start = res_mem->start; > - hcd->rsrc_len = resource_size(res_mem); > - > - hcd->regs = devm_ioremap_resource(&dev->dev, res_mem); > + hcd->regs = devm_platform_get_and_ioremap_resource(dev, 0, &res_mem); > if (IS_ERR(hcd->regs)) { > err = PTR_ERR(hcd->regs); > goto err_put_clks; > } > + hcd->rsrc_start = res_mem->start; > + hcd->rsrc_len = resource_size(res_mem); > > err = usb_add_hcd(hcd, irq, IRQF_SHARED); > if (err) Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Thanks Patrice _______________________________________________ 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] 7+ messages in thread
[parent not found: <20230726113816.888-30-frank.li@vivo.com>]
* Re: [PATCH 30/30] usb: ohci-st: Use devm_platform_get_and_ioremap_resource() [not found] ` <20230726113816.888-30-frank.li@vivo.com> @ 2023-08-28 9:08 ` Patrice CHOTARD 0 siblings, 0 replies; 7+ messages in thread From: Patrice CHOTARD @ 2023-08-28 9:08 UTC (permalink / raw) To: Yangtao Li, Alan Stern, Greg Kroah-Hartman Cc: linux-arm-kernel, linux-usb, linux-kernel On 7/26/23 13:38, 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/usb/host/ohci-st.c | 14 ++++---------- > 1 file changed, 4 insertions(+), 10 deletions(-) > > diff --git a/drivers/usb/host/ohci-st.c b/drivers/usb/host/ohci-st.c > index 884e447a8098..214342013f7e 100644 > --- a/drivers/usb/host/ohci-st.c > +++ b/drivers/usb/host/ohci-st.c > @@ -139,12 +139,6 @@ static int st_ohci_platform_probe(struct platform_device *dev) > if (irq < 0) > return irq; > > - res_mem = platform_get_resource(dev, IORESOURCE_MEM, 0); > - if (!res_mem) { > - dev_err(&dev->dev, "no memory resource provided"); > - return -ENXIO; > - } > - > hcd = usb_create_hcd(&ohci_platform_hc_driver, &dev->dev, > dev_name(&dev->dev)); > if (!hcd) > @@ -199,14 +193,14 @@ static int st_ohci_platform_probe(struct platform_device *dev) > goto err_power; > } > > - hcd->rsrc_start = res_mem->start; > - hcd->rsrc_len = resource_size(res_mem); > - > - hcd->regs = devm_ioremap_resource(&dev->dev, res_mem); > + hcd->regs = devm_platform_get_and_ioremap_resource(dev, 0, &res_mem); > if (IS_ERR(hcd->regs)) { > err = PTR_ERR(hcd->regs); > goto err_power; > } > + hcd->rsrc_start = res_mem->start; > + hcd->rsrc_len = resource_size(res_mem); > + > err = usb_add_hcd(hcd, irq, IRQF_SHARED); > if (err) > goto err_power; Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Thanks Patrice _______________________________________________ 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] 7+ messages in thread
end of thread, other threads:[~2023-08-28 9:09 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20230726113816.888-1-frank.li@vivo.com>
[not found] ` <20230726113816.888-29-frank.li@vivo.com>
2023-07-27 0:46 ` [PATCH 29/30] usb: ehci-exynos: Use devm_platform_get_and_ioremap_resource() Andi Shyti
[not found] ` <20230726113816.888-8-frank.li@vivo.com>
2023-07-27 5:34 ` [PATCH 08/30] usb: gadget/atmel_usba_udc: " claudiu beznea
2023-07-27 12:20 ` Cristian.Birsan
[not found] ` <20230726113816.888-10-frank.li@vivo.com>
2023-07-27 5:35 ` [PATCH 10/30] usb: ehci-atmel: " claudiu beznea
[not found] ` <20230726113816.888-4-frank.li@vivo.com>
2023-07-27 5:35 ` [PATCH 04/30] usb: ohci-at91: Remove redundant msg at probe time claudiu beznea
[not found] ` <20230726113816.888-28-frank.li@vivo.com>
2023-08-28 9:08 ` [PATCH 28/30] usb: ehci-st: Use devm_platform_get_and_ioremap_resource() Patrice CHOTARD
[not found] ` <20230726113816.888-30-frank.li@vivo.com>
2023-08-28 9:08 ` [PATCH 30/30] usb: ohci-st: " Patrice CHOTARD
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox