From: Nicolas Ferre Date: Wed, 9 May 2012 08:49:41 +0000 (+0200) Subject: USB: ohci-at91: use resource_size() for memory/io resource length X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7a82f612fa3aadb5676184ae202903f5a42e4f4a;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git USB: ohci-at91: use resource_size() for memory/io resource length Signed-off-by: Nicolas Ferre Signed-off-by: Greg Kroah-Hartman --- 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, if (!hcd) return -ENOMEM; hcd->rsrc_start = pdev->resource[0].start; - hcd->rsrc_len = pdev->resource[0].end - pdev->resource[0].start + 1; + hcd->rsrc_len = resource_size(&pdev->resource[0]); if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) { pr_debug("request_mem_region failed\n");