diff options
author | Nicolas Ferre <nicolas.ferre@atmel.com> | 2012-05-09 04:49:41 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-05-09 18:20:45 -0400 |
commit | 7a82f612fa3aadb5676184ae202903f5a42e4f4a (patch) | |
tree | 05b330a78ea7cd4278cd4f10ce0af0cd36ea7270 | |
parent | 7b18389dd4fe0b178117b09d054e214297f7e677 (diff) |
USB: ohci-at91: use resource_size() for memory/io resource length
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/usb/host/ohci-at91.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c index 476fb4d3e45e..d4608c2d5b64 100644 --- a/drivers/usb/host/ohci-at91.c +++ b/drivers/usb/host/ohci-at91.c | |||
@@ -129,7 +129,7 @@ static int __devinit usb_hcd_at91_probe(const struct hc_driver *driver, | |||
129 | if (!hcd) | 129 | if (!hcd) |
130 | return -ENOMEM; | 130 | return -ENOMEM; |
131 | hcd->rsrc_start = pdev->resource[0].start; | 131 | hcd->rsrc_start = pdev->resource[0].start; |
132 | hcd->rsrc_len = pdev->resource[0].end - pdev->resource[0].start + 1; | 132 | hcd->rsrc_len = resource_size(&pdev->resource[0]); |
133 | 133 | ||
134 | if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) { | 134 | if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) { |
135 | pr_debug("request_mem_region failed\n"); | 135 | pr_debug("request_mem_region failed\n"); |