projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f65c354
)
USB: ehci-au1xxx.c: use platform_get_resource() and resource_size()
author
H Hartley Sweeten
<
[email protected]
>
Mon, 14 Dec 2009 23:22:42 +0000
(18:22 -0500)
committer
Greg Kroah-Hartman
<
[email protected]
>
Tue, 2 Mar 2010 22:53:18 +0000
(14:53 -0800)
Use platform_get_resource() to fetch the memory resource and
resource_size() for calculate the length.
Signed-off-by: H Hartley Sweeten <
[email protected]
>
Cc: David Brownell <
[email protected]
>
Signed-off-by: Greg Kroah-Hartman <
[email protected]
>
drivers/usb/host/ehci-au1xxx.c
patch
|
blob
|
history
diff --git
a/drivers/usb/host/ehci-au1xxx.c
b/drivers/usb/host/ehci-au1xxx.c
index dbfb482a94e37a7389c2d9c13681a5c9da408325..e3a74e75e8225585c5c85e089f82fe046e7b4796 100644
(file)
--- a/
drivers/usb/host/ehci-au1xxx.c
+++ b/
drivers/usb/host/ehci-au1xxx.c
@@
-121,6
+121,7
@@
static int ehci_hcd_au1xxx_drv_probe(struct platform_device *pdev)
{
struct usb_hcd *hcd;
struct ehci_hcd *ehci;
+ struct resource *res;
int ret;
if (usb_disabled())
@@
-144,8
+145,9
@@
static int ehci_hcd_au1xxx_drv_probe(struct platform_device *pdev)
if (!hcd)
return -ENOMEM;
- hcd->rsrc_start = pdev->resource[0].start;
- hcd->rsrc_len = pdev->resource[0].end - pdev->resource[0].start + 1;
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ hcd->rsrc_start = res->start;
+ hcd->rsrc_len = resource_size(res);
if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) {
pr_debug("request_mem_region failed");