usb: ohci-spear: Remove direct access to platform_device resource list
Subsystems (2)
PATCH 1/1 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.
Signed-off-by Rob Herring <[email protected]>
--- drivers/usb/host/ohci-spear.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/host/ohci-spear.c +1 -1
@@ -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);
Signature · 1 line
2.32.0
Quoted 5 lines · Rob Herring
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 <[email protected]>---
Acked-by Alan Stern <[email protected]>
Quoted 19 lines
drivers/usb/host/ohci-spear.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/usb/host/ohci-spear.c +1
-1@@ -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);Signature · 1 line
2.32.0