From patchwork Wed Nov 17 10:44:19 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sekhar Nori X-Patchwork-Id: 332161 Received: from bear.ext.ti.com (bear.ext.ti.com [192.94.94.41]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oAHB2BJA016291 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 17 Nov 2010 11:02:32 GMT Received: from dlep35.itg.ti.com ([157.170.170.118]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id oAHAxmiw020703 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 17 Nov 2010 04:59:48 -0600 Received: from linux.omap.com (localhost [127.0.0.1]) by dlep35.itg.ti.com (8.13.7/8.13.7) with ESMTP id oAHAxlcC027787; Wed, 17 Nov 2010 04:59:47 -0600 (CST) Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id 8254680661; Wed, 17 Nov 2010 04:59:41 -0600 (CST) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dbdp31.itg.ti.com (dbdp31.itg.ti.com [172.24.170.98]) by linux.omap.com (Postfix) with ESMTP id 1B4FE80648 for ; Wed, 17 Nov 2010 04:44:34 -0600 (CST) Received: from psplinux051.india.ti.com (localhost [127.0.0.1]) by dbdp31.itg.ti.com (8.13.8/8.13.8) with ESMTP id oAHAiVmD021948; Wed, 17 Nov 2010 16:14:32 +0530 (IST) Received: from psplinux051.india.ti.com (localhost [127.0.0.1]) by psplinux051.india.ti.com (8.13.1/8.13.1) with ESMTP id oAHAiQlv030585; Wed, 17 Nov 2010 16:14:26 +0530 Received: (from a0875516@localhost) by psplinux051.india.ti.com (8.13.1/8.13.1/Submit) id oAHAiQ8m030582; Wed, 17 Nov 2010 16:14:26 +0530 From: Sekhar Nori To: spi-devel-general@lists.sourceforge.net Subject: [PATCH 47/49] spi: davinci: remove unnecessary private data member 'region_size' Date: Wed, 17 Nov 2010 16:14:19 +0530 Message-Id: <1289990661-30126-48-git-send-email-nsekhar@ti.com> X-Mailer: git-send-email 1.6.2.4 In-Reply-To: <1289990661-30126-47-git-send-email-nsekhar@ti.com> References: <1289990661-30126-1-git-send-email-nsekhar@ti.com> <1289990661-30126-2-git-send-email-nsekhar@ti.com> <1289990661-30126-3-git-send-email-nsekhar@ti.com> <1289990661-30126-4-git-send-email-nsekhar@ti.com> <1289990661-30126-5-git-send-email-nsekhar@ti.com> <1289990661-30126-6-git-send-email-nsekhar@ti.com> <1289990661-30126-7-git-send-email-nsekhar@ti.com> <1289990661-30126-8-git-send-email-nsekhar@ti.com> <1289990661-30126-9-git-send-email-nsekhar@ti.com> <1289990661-30126-10-git-send-email-nsekhar@ti.com> <1289990661-30126-11-git-send-email-nsekhar@ti.com> <1289990661-30126-12-git-send-email-nsekhar@ti.com> <1289990661-30126-13-git-send-email-nsekhar@ti.com> <1289990661-30126-14-git-send-email-nsekhar@ti.com> <1289990661-30126-15-git-send-email-nsekhar@ti.com> <1289990661-30126-16-git-send-email-nsekhar@ti.com> <1289990661-30126-17-git-send-email-nsekhar@ti.com> <1289990661-30126-18-git-send-email-nsekhar@ti.com> <1289990661-30126-19-git-send-email-nsekhar@ti.com> <1289990661-30126-20-git-send-email-nsekhar@ti.com> <1289990661-30126-21-git-send-email-nsekhar@ti.com> <1289990661-30126-22-git-send-email-nsekhar@ti.com> <1289990661-30126-23-git-send-email-nsekhar@ti.com> <1289990661-30126-24-git-send-email-nsekhar@ti.com> <1289990661-30126-25-git-send-email-nsekhar@ti.com> <1289990661-30126-26-git-send-email-nsekhar@ti.com> <1289990661-30126-27-git-send-email-nsekhar@ti.com> <1289990661-30126-28-git-send-email-nsekhar@ti.com> <1289990661-30126-29-git-send-email-nsekhar@ti.com> <1289990661-30126-30-git-send-email-nsekhar@ti.com> <1289990661-30126-31-git-send-email-nsekhar@ti.com> <1289990661-30126-32-git-send-email-nsekhar@ti.com> <1289990661-30126-33-git-send-email-nsekhar@ti.com> <1289990661-30126-34-git-send-email-nsekhar@ti.com> <1289990661-30126-35-git-send-email-nsekhar@ti.com> <1289990661-30126-36-git-send-email-nsekhar@ti.com> <1289990661-30126-37-git-send-email-nsekhar@ti.com> <1289990661-30126-38-git-send-email-nsekhar@ti.com> <1289990661-30126-39-git-send-email-nsekhar@ti.com> <1289990661-30126-40-git-send-email-nsekhar@ti.com> <1289990661-30126-41-git-send-email-nsekhar@ti.com> <1289990661-30126-42-git-send-email-nsekhar@ti.com> <1289990661-30126-43-git-send-email-nsekhar@ti.com> <1289990661-30126-44-git-send-email-nsekhar@ti.com> <1289990661-30126-45-git-send-email-nsekhar@ti.com> <1289990661-30126-46-git-send-email-nsekhar@ti.com> <1289990661-30126-47-git-send-email-nsekhar@ti.com> Cc: Grant Likely , davinci-linux-open-source@linux.davincidsp.com, David Brownell X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: davinci-linux-open-source-bounces@linux.davincidsp.com Errors-To: davinci-linux-open-source-bounces@linux.davincidsp.com X-Greylist: Sender succeeded STARTTLS authentication, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Wed, 17 Nov 2010 11:02:32 +0000 (UTC) diff --git a/drivers/spi/davinci_spi.c b/drivers/spi/davinci_spi.c index 42314a32..f6f63d0 100644 --- a/drivers/spi/davinci_spi.c +++ b/drivers/spi/davinci_spi.c @@ -129,7 +129,6 @@ struct davinci_spi { u8 version; resource_size_t pbase; void __iomem *base; - size_t region_size; u32 irq; struct completion done; @@ -835,17 +834,15 @@ static int davinci_spi_probe(struct platform_device *pdev) } davinci_spi->pbase = r->start; - davinci_spi->region_size = resource_size(r); davinci_spi->pdata = pdata; - mem = request_mem_region(r->start, davinci_spi->region_size, - pdev->name); + mem = request_mem_region(r->start, resource_size(r), pdev->name); if (mem == NULL) { ret = -EBUSY; goto free_master; } - davinci_spi->base = ioremap(r->start, davinci_spi->region_size); + davinci_spi->base = ioremap(r->start, resource_size(r)); if (davinci_spi->base == NULL) { ret = -ENOMEM; goto release_region; @@ -972,7 +969,7 @@ irq_free: unmap_io: iounmap(davinci_spi->base); release_region: - release_mem_region(davinci_spi->pbase, davinci_spi->region_size); + release_mem_region(davinci_spi->pbase, resource_size(r)); free_master: kfree(master); err: @@ -992,6 +989,7 @@ static int __exit davinci_spi_remove(struct platform_device *pdev) { struct davinci_spi *davinci_spi; struct spi_master *master; + struct resource *r; master = dev_get_drvdata(&pdev->dev); davinci_spi = spi_master_get_devdata(master); @@ -1003,7 +1001,8 @@ static int __exit davinci_spi_remove(struct platform_device *pdev) spi_master_put(master); free_irq(davinci_spi->irq, davinci_spi); iounmap(davinci_spi->base); - release_mem_region(davinci_spi->pbase, davinci_spi->region_size); + r = platform_get_resource(pdev, IORESOURCE_MEM, 0); + release_mem_region(davinci_spi->pbase, resource_size(r)); return 0; }