Commit d12edf96 authored by Zou Wei's avatar Zou Wei Committed by Lee Jones

mfd: altera-sysmgr: Use resource_size function on resource object

drivers/mfd/altera-sysmgr.c:155:36-39: WARNING: Suspicious code. resource_size is maybe missing with res

Generated by: scripts/coccinelle/api/resource_size.cocci
Signed-off-by: default avatarZou Wei <zou_wei@huawei.com>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent 14639a22
......@@ -152,7 +152,7 @@ static int sysmgr_probe(struct platform_device *pdev)
if (!base)
return -ENOMEM;
sysmgr_config.max_register = res->end - res->start - 3;
sysmgr_config.max_register = resource_size(res) - 3;
regmap = devm_regmap_init_mmio(dev, base, &sysmgr_config);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment