summaryrefslogtreecommitdiff
path: root/drivers/usb/host/ohci-spear.c
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2021-12-16 01:55:09 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-12-17 18:51:31 +0300
commit2dec70f18b914a3108ab656417c4a0b77fdea2cf (patch)
treeebcd83162ee63f5b043ca70653c89b4f439b25b4 /drivers/usb/host/ohci-spear.c
parentd6bfc848af12b32591e59aff58d5bfbd00d80b0c (diff)
downloadlinux-2dec70f18b914a3108ab656417c4a0b77fdea2cf.tar.xz
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 <stern@rowland.harvard.edu> Signed-off-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20211215225509.1995417-1-robh@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/ohci-spear.c')
-rw-r--r--drivers/usb/host/ohci-spear.c2
1 files changed, 1 insertions, 1 deletions
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);