Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753913AbZLKQwg (ORCPT ); Fri, 11 Dec 2009 11:52:36 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752541AbZLKQwc (ORCPT ); Fri, 11 Dec 2009 11:52:32 -0500 Received: from exprod6og115.obsmtp.com ([64.18.1.35]:51763 "EHLO exprod6og115.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751229AbZLKQwb convert rfc822-to-8bit (ORCPT ); Fri, 11 Dec 2009 11:52:31 -0500 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT Subject: [PATCH] mpc85xx_edac.c: use resource_size() Date: Fri, 11 Dec 2009 11:52:36 -0500 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH] mpc85xx_edac.c: use resource_size() Thread-Index: Acp6glcq9VaWvFhSQ924lB5spiRPOw== From: "H Hartley Sweeten" To: "kernel list" Cc: , X-OriginalArrivalTime: 11 Dec 2009 16:52:36.0768 (UTC) FILETIME=[579C5200:01CA7A82] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1308 Lines: 37 Use resource_size(). Signed-off-by: H Hartley Sweeten Cc: Doug Thompson Cc: Dave Jiang --- diff --git a/drivers/edac/mpc85xx_edac.c b/drivers/edac/mpc85xx_edac.c index cf27402..adecf37 100644 --- a/drivers/edac/mpc85xx_edac.c +++ b/drivers/edac/mpc85xx_edac.c @@ -239,16 +239,15 @@ static int __devinit mpc85xx_pci_err_probe(struct of_device *op, /* we only need the error registers */ r.start += 0xe00; - if (!devm_request_mem_region(&op->dev, r.start, - r.end - r.start + 1, pdata->name)) { + if (!devm_request_mem_region(&op->dev, r.start, resource_size(&r), + pdata->name)) { printk(KERN_ERR "%s: Error while requesting mem region\n", __func__); res = -EBUSY; goto err; } - pdata->pci_vbase = devm_ioremap(&op->dev, r.start, - r.end - r.start + 1); + pdata->pci_vbase = devm_ioremap(&op->dev, r.start, resource_size(&r)); if (!pdata->pci_vbase) { printk(KERN_ERR "%s: Unable to setup PCI err regs\n", __func__); res = -ENOMEM; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/