linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xilinx_spi.c: use resource_size()
@ 2009-12-14 22:48 H Hartley Sweeten
  2009-12-14 23:36 ` [spi-devel-general] " H Hartley Sweeten
  0 siblings, 1 reply; 2+ messages in thread
From: H Hartley Sweeten @ 2009-12-14 22:48 UTC (permalink / raw)
  To: kernel list, spi-devel-general; +Cc: David Brownell

Use resource_size().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>

---

diff --git a/drivers/spi/xilinx_spi.c b/drivers/spi/xilinx_spi.c
index 5a143b9..32525e6 100644
--- a/drivers/spi/xilinx_spi.c
+++ b/drivers/spi/xilinx_spi.c
@@ -332,14 +332,14 @@ static int __init xilinx_spi_of_probe(struct of_device *ofdev,
 
 	xspi->irq = r_irq->start;
 
-	if (!request_mem_region(r_mem->start,
-			r_mem->end - r_mem->start + 1, XILINX_SPI_NAME)) {
+	if (!request_mem_region(r_mem->start, resource_size(r_mem),
+			XILINX_SPI_NAME)) {
 		rc = -ENXIO;
 		dev_warn(&ofdev->dev, "memory request failure\n");
 		goto put_master;
 	}
 
-	xspi->regs = ioremap(r_mem->start, r_mem->end - r_mem->start + 1);
+	xspi->regs = ioremap(r_mem->start, resource_size(r_mem));
 	if (xspi->regs == NULL) {
 		rc = -ENOMEM;
 		dev_warn(&ofdev->dev, "ioremap failure\n"); 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* RE: [spi-devel-general] [PATCH] xilinx_spi.c: use resource_size()
  2009-12-14 22:48 [PATCH] xilinx_spi.c: use resource_size() H Hartley Sweeten
@ 2009-12-14 23:36 ` H Hartley Sweeten
  0 siblings, 0 replies; 2+ messages in thread
From: H Hartley Sweeten @ 2009-12-14 23:36 UTC (permalink / raw)
  To: kernel list, spi-devel-general; +Cc: David Brownell

On Monday, December 14, 2009 3:49 PM, H Hartley Sweeten wrote:
> Use resource_size().
> 
> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
> Cc: David Brownell <dbrownell@users.sourceforge.net>

Please ignore.  An update to this driver just got merged that
handles this.

Sorry for the noise,
Hartley

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-12-14 23:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-14 22:48 [PATCH] xilinx_spi.c: use resource_size() H Hartley Sweeten
2009-12-14 23:36 ` [spi-devel-general] " H Hartley Sweeten

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).