瀏覽代碼

of: address: use resource_size helper

that should be the approved way of calculating
the size of resources. No functional changes.

Cc: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Felipe Balbi 14 年之前
父節點
當前提交
28c1b6d60e
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/of/address.c

+ 1 - 1
drivers/of/address.c

@@ -610,6 +610,6 @@ void __iomem *of_iomap(struct device_node *np, int index)
 	if (of_address_to_resource(np, index, &res))
 		return NULL;
 
-	return ioremap(res.start, 1 + res.end - res.start);
+	return ioremap(res.start, resource_size(&res));
 }
 EXPORT_SYMBOL(of_iomap);