* [PATCH] usb: ohci-spear: Remove direct access to platform_device resource list
@ 2021-12-15 22:55 Rob Herring
2021-12-16 16:10 ` Alan Stern
0 siblings, 1 reply; 2+ messages in thread
From: Rob Herring @ 2021-12-15 22:55 UTC (permalink / raw)
To: Alan Stern, Greg Kroah-Hartman; +Cc: Lad Prabhakar, linux-usb, linux-kernel
The memory resource is already retrieved with platform_get_resource(), so
let's use it instead of assuming it is the first resource in the array.
Signed-off-by: Rob Herring <robh@kernel.org>
---
drivers/usb/host/ohci-spear.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/host/ohci-spear.c b/drivers/usb/host/ohci-spear.c
index b4cd9e6c72fd..9b81f420656d 100644
--- a/drivers/usb/host/ohci-spear.c
+++ b/drivers/usb/host/ohci-spear.c
@@ -76,7 +76,7 @@ static int spear_ohci_hcd_drv_probe(struct platform_device *pdev)
goto err_put_hcd;
}
- hcd->rsrc_start = pdev->resource[0].start;
+ hcd->rsrc_start = res->start;
hcd->rsrc_len = resource_size(res);
sohci_p = to_spear_ohci(hcd);
--
2.32.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] usb: ohci-spear: Remove direct access to platform_device resource list
2021-12-15 22:55 [PATCH] usb: ohci-spear: Remove direct access to platform_device resource list Rob Herring
@ 2021-12-16 16:10 ` Alan Stern
0 siblings, 0 replies; 2+ messages in thread
From: Alan Stern @ 2021-12-16 16:10 UTC (permalink / raw)
To: Rob Herring; +Cc: Greg Kroah-Hartman, Lad Prabhakar, linux-usb, linux-kernel
On Wed, Dec 15, 2021 at 04:55:09PM -0600, Rob Herring wrote:
> The memory resource is already retrieved with platform_get_resource(), so
> let's use it instead of assuming it is the first resource in the array.
>
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
Acked-by: Alan Stern <stern@rowland.harvard.edu>
> drivers/usb/host/ohci-spear.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/host/ohci-spear.c b/drivers/usb/host/ohci-spear.c
> index b4cd9e6c72fd..9b81f420656d 100644
> --- a/drivers/usb/host/ohci-spear.c
> +++ b/drivers/usb/host/ohci-spear.c
> @@ -76,7 +76,7 @@ static int spear_ohci_hcd_drv_probe(struct platform_device *pdev)
> goto err_put_hcd;
> }
>
> - hcd->rsrc_start = pdev->resource[0].start;
> + hcd->rsrc_start = res->start;
> hcd->rsrc_len = resource_size(res);
>
> sohci_p = to_spear_ohci(hcd);
> --
> 2.32.0
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-12-16 16:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-15 22:55 [PATCH] usb: ohci-spear: Remove direct access to platform_device resource list Rob Herring
2021-12-16 16:10 ` Alan Stern
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).