mirror of https://gitee.com/openkylin/linux.git
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: Zou Wei <zou_wei@huawei.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
This commit is contained in:
parent
14639a22de
commit
d12edf9661
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue