Patchwork drivers/ide/tx4938ide.c: use resource_size()

login
register
mail settings
Submitter hartleys
Date Nov. 23, 2009, 6:27 p.m.
Message ID <BD79186B4FD85F4B8E60E381CAEE190901EE5C05@mi8nycmail19.Mi8.com>
Download mbox | patch
Permalink /patch/39066/
State Accepted
Delegated to: David Miller
Headers show

Comments

hartleys - Nov. 23, 2009, 6:27 p.m.
Use resource_size() for devm_request_mem_region.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>

---

--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller - Nov. 23, 2009, 6:31 p.m.
From: "H Hartley Sweeten" <hartleys@visionengravers.com>
Date: Mon, 23 Nov 2009 13:27:23 -0500

> Use resource_size() for devm_request_mem_region.
> 
> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>

Applied to ide-next-2.6
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/ide/tx4938ide.c b/drivers/ide/tx4938ide.c
index ea89fdd..fd59c0d 100644
--- a/drivers/ide/tx4938ide.c
+++ b/drivers/ide/tx4938ide.c
@@ -146,7 +146,7 @@  static int __init tx4938ide_probe(struct platform_device *pdev)
 		return -ENODEV;
 
 	if (!devm_request_mem_region(&pdev->dev, res->start,
-				     res->end - res->start + 1, "tx4938ide"))
+				     resource_size(res), "tx4938ide"))
 		return -EBUSY;
 	mapbase = (unsigned long)devm_ioremap(&pdev->dev, res->start,
 					      8 << pdata->ioport_shift);