drivers/mtd/nand/s3c2410.c: use resource_size()

Submitted by hartleys on Dec. 14, 2009, 9:56 p.m.

Details

Message ID BD79186B4FD85F4B8E60E381CAEE19090200EA66@mi8nycmail19.Mi8.com
State Accepted
Commit fc161c4e8ec9b12d42b10d510a9de8562ea3afac
Headers show

Commit Message

hartleys Dec. 14, 2009, 9:56 p.m.
Use resource_size().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Ben Dooks <ben-linux@fluff.org>

---

Patch hide | download patch | download mbox

diff --git a/drivers/mtd/nand/s3c2410.c b/drivers/mtd/nand/s3c2410.c
index 68b5b3a..3b5a8cc 100644
--- a/drivers/mtd/nand/s3c2410.c
+++ b/drivers/mtd/nand/s3c2410.c
@@ -957,7 +957,7 @@  static int s3c24xx_nand_probe(struct platform_device *pdev)
 
 	/* currently we assume we have the one resource */
 	res  = pdev->resource;
-	size = res->end - res->start + 1;
+	size = resource_size(res);
 
 	info->area = request_mem_region(res->start, size, pdev->name);