treewide: Convert uses of struct resource to resource_size(ptr)
Several fixes as well where the +1 was missing. Done via coccinelle scripts like: @@ struct resource *ptr; @@ - ptr->end - ptr->start + 1 + resource_size(ptr) and some grep and typing. Mostly uncompiled, no cross-compilers. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
这个提交包含在:
@@ -101,7 +101,7 @@ static void __init mpc83xx_km_setup_arch(void)
|
||||
__func__);
|
||||
return;
|
||||
}
|
||||
base = ioremap(res.start, res.end - res.start + 1);
|
||||
base = ioremap(res.start, resource_size(&res));
|
||||
|
||||
/*
|
||||
* IMMR + 0x14A8[4:5] = 11 (clk delay for UCC 2)
|
||||
|
@@ -68,7 +68,7 @@ static void __init mpc832x_sys_setup_arch(void)
|
||||
struct resource res;
|
||||
|
||||
of_address_to_resource(np, 0, &res);
|
||||
bcsr_regs = ioremap(res.start, res.end - res.start +1);
|
||||
bcsr_regs = ioremap(res.start, resource_size(&res));
|
||||
of_node_put(np);
|
||||
}
|
||||
|
||||
|
@@ -53,7 +53,7 @@ static int mpc834xemds_usb_cfg(void)
|
||||
struct resource res;
|
||||
|
||||
of_address_to_resource(np, 0, &res);
|
||||
bcsr_regs = ioremap(res.start, res.end - res.start + 1);
|
||||
bcsr_regs = ioremap(res.start, resource_size(&res));
|
||||
of_node_put(np);
|
||||
}
|
||||
if (!bcsr_regs)
|
||||
|
@@ -76,7 +76,7 @@ static void __init mpc836x_mds_setup_arch(void)
|
||||
struct resource res;
|
||||
|
||||
of_address_to_resource(np, 0, &res);
|
||||
bcsr_regs = ioremap(res.start, res.end - res.start +1);
|
||||
bcsr_regs = ioremap(res.start, resource_size(&res));
|
||||
of_node_put(np);
|
||||
}
|
||||
|
||||
|
@@ -171,7 +171,7 @@ int mpc831x_usb_cfg(void)
|
||||
of_node_put(np);
|
||||
return ret;
|
||||
}
|
||||
usb_regs = ioremap(res.start, res.end - res.start + 1);
|
||||
usb_regs = ioremap(res.start, resource_size(&res));
|
||||
|
||||
/* Using on-chip PHY */
|
||||
if (prop && (!strcmp(prop, "utmi_wide") ||
|
||||
|
在新工单中引用
屏蔽一个用户