mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-04 20:19:47 +08:00
mtd: drivers/mtd/nand/sh_flctl.c: use resource_size()
Use resource_size(). Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Acked-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
This commit is contained in:
parent
448791abfb
commit
cbd38a875f
@ -797,7 +797,7 @@ static int __init flctl_probe(struct platform_device *pdev)
|
|||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
flctl->reg = ioremap(res->start, res->end - res->start + 1);
|
flctl->reg = ioremap(res->start, resource_size(res));
|
||||||
if (flctl->reg == NULL) {
|
if (flctl->reg == NULL) {
|
||||||
printk(KERN_ERR "%s: ioremap error.\n", __func__);
|
printk(KERN_ERR "%s: ioremap error.\n", __func__);
|
||||||
ret = -ENOMEM;
|
ret = -ENOMEM;
|
||||||
|
Loading…
Reference in New Issue
Block a user