From 2dec70f18b914a3108ab656417c4a0b77fdea2cf Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Wed, 15 Dec 2021 16:55:09 -0600 Subject: usb: ohci-spear: Remove direct access to platform_device resource list 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. Acked-by: Alan Stern Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20211215225509.1995417-1-robh@kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/usb/host/ohci-spear.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/usb') 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); -- cgit v1.2.3