Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e0998eab authored by Axel Lin's avatar Axel Lin Committed by Paul Mundt
Browse files

video: sh7760fb: use resource_size()



The size calculation is done incorrectly in request_mem_region because
it should include both the start and end (end - start + 1).

Signed-off-by: default avatarAxel Lin <axel.lin@gmail.com>
Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent 56fb22f7
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -459,14 +459,14 @@ static int __devinit sh7760fb_probe(struct platform_device *pdev)
	}

	par->ioarea = request_mem_region(res->start,
					 (res->end - res->start), pdev->name);
					 resource_size(res), pdev->name);
	if (!par->ioarea) {
		dev_err(&pdev->dev, "mmio area busy\n");
		ret = -EBUSY;
		goto out_fb;
	}

	par->base = ioremap_nocache(res->start, res->end - res->start + 1);
	par->base = ioremap_nocache(res->start, resource_size(res));
	if (!par->base) {
		dev_err(&pdev->dev, "cannot remap\n");
		ret = -ENODEV;