From 30433d8141e239fe3621c882170876b9e5a2a94b Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Mon, 23 Nov 2009 10:30:34 -0800 Subject: [PATCH] drivers/ide/ide_platform.c: use resource_size() Use resource_size() for devm_{ioremap/io_port_map}. Signed-off-by: H Hartley Sweeten Signed-off-by: David S. Miller --- drivers/ide/ide_platform.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/ide/ide_platform.c b/drivers/ide/ide_platform.c index b579fbe88370..42965b3e30b9 100644 --- a/drivers/ide/ide_platform.c +++ b/drivers/ide/ide_platform.c @@ -81,14 +81,14 @@ static int __devinit plat_ide_probe(struct platform_device *pdev) if (mmio) { base = devm_ioremap(&pdev->dev, - res_base->start, res_base->end - res_base->start + 1); + res_base->start, resource_size(res_base)); alt_base = devm_ioremap(&pdev->dev, - res_alt->start, res_alt->end - res_alt->start + 1); + res_alt->start, resource_size(res_alt)); } else { base = devm_ioport_map(&pdev->dev, - res_base->start, res_base->end - res_base->start + 1); + res_base->start, resource_size(res_base)); alt_base = devm_ioport_map(&pdev->dev, - res_alt->start, res_alt->end - res_alt->start + 1); + res_alt->start, resource_size(res_alt)); } memset(&hw, 0, sizeof(hw)); -- 2.20.1