Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762167AbZLKB3t (ORCPT ); Thu, 10 Dec 2009 20:29:49 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1762054AbZLKB3s (ORCPT ); Thu, 10 Dec 2009 20:29:48 -0500 Received: from exprod6og104.obsmtp.com ([64.18.1.187]:34563 "EHLO exprod6og104.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761999AbZLKB3r convert rfc822-to-8bit (ORCPT ); Thu, 10 Dec 2009 20:29:47 -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] at_hdmac.c: use resource_size() Date: Thu, 10 Dec 2009 20:29:52 -0500 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH] at_hdmac.c: use resource_size() Thread-Index: Acp6AW/oPj5CFYEfTji0kyuh7cRvqA== From: "H Hartley Sweeten" To: "kernel list" Cc: X-OriginalArrivalTime: 11 Dec 2009 01:29:53.0833 (UTC) FILETIME=[70BAD990:01CA7A01] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 899 Lines: 24 Use resource_size() for ioremap. Signed-off-by: H Hartley Sweeten Cc: Nicolas Ferre --- diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c index c52ac9e..e16057b 100644 --- a/drivers/dma/at_hdmac.c +++ b/drivers/dma/at_hdmac.c @@ -1012,7 +1012,7 @@ static int __init at_dma_probe(struct platform_device *pdev) atdma->dma_common.cap_mask = pdata->cap_mask; atdma->all_chan_mask = (1 << pdata->nr_channels) - 1; - size = io->end - io->start + 1; + size = resource_size(io); if (!request_mem_region(io->start, size, pdev->dev.driver->name)) { err = -EBUSY; goto err_kfree; -- 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/