omap: Use resource_size
Use the resource_size function instead of manually calculating the resource size. This reduces the chance of introducing off-by-one errors and actually fixes one in mailbox.c. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Tony Lindgren <tony@atomide.com>
This commit is contained in:
committed by
Tony Lindgren
parent
ee90732456
commit
6d13524209
@@ -300,7 +300,7 @@ static int __devinit omap2_mbox_probe(struct platform_device *pdev)
|
||||
dev_err(&pdev->dev, "invalid mem resource\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
mbox_base = ioremap(res->start, res->end - res->start);
|
||||
mbox_base = ioremap(res->start, resource_size(res));
|
||||
if (!mbox_base)
|
||||
return -ENOMEM;
|
||||
|
||||
|
Reference in New Issue
Block a user