浏览代码

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>
Nicolas Ferre 13 年之前
父节点
当前提交
7a82f612fa
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/usb/host/ohci-at91.c

+ 1 - 1
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");