mirror of
https://github.com/torvalds/linux.git
synced 2024-11-12 15:11:50 +00:00
spi_s3c24xx: use resource_size() to get resource size
Change the use of (res->end - res->start) to use resource_size() to get the size of the resource. Signed-off-by; Ben Dooks <ben@simtec.co.uk> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
1a0c220f79
commit
b5e3afb5e3
@ -299,7 +299,7 @@ static int __init s3c24xx_spi_probe(struct platform_device *pdev)
|
||||
goto err_no_iores;
|
||||
}
|
||||
|
||||
hw->ioarea = request_mem_region(res->start, (res->end - res->start)+1,
|
||||
hw->ioarea = request_mem_region(res->start, resource_size(res),
|
||||
pdev->name);
|
||||
|
||||
if (hw->ioarea == NULL) {
|
||||
@ -308,7 +308,7 @@ static int __init s3c24xx_spi_probe(struct platform_device *pdev)
|
||||
goto err_no_iores;
|
||||
}
|
||||
|
||||
hw->regs = ioremap(res->start, (res->end - res->start)+1);
|
||||
hw->regs = ioremap(res->start, resource_size(res));
|
||||
if (hw->regs == NULL) {
|
||||
dev_err(&pdev->dev, "Cannot map IO\n");
|
||||
err = -ENXIO;
|
||||
|
Loading…
Reference in New Issue
Block a user