linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] spi_txx9.c: use resource_size()
@ 2009-12-14 22:43 H Hartley Sweeten
       [not found] ` <BD79186B4FD85F4B8E60E381CAEE19090200EA8F-KURmP/Qoe8Pmp66j18f85VaTQe2KTcn/@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: H Hartley Sweeten @ 2009-12-14 22:43 UTC (permalink / raw)
  To: kernel list, spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
  Cc: anemo-7JcRY8pycbNHfZP73Gtkiw, David Brownell

Use resource_size().

Signed-off-by: H Hartley Sweeten <hsweeten-3FF4nKcrg1dE2c76skzGb0EOCMrvLtNR@public.gmane.org>
Cc: David Brownell <dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
Cc: Atsushi Nemoto <anemo-7JcRY8pycbNHfZP73Gtkiw@public.gmane.org>

---

diff --git a/drivers/spi/spi_txx9.c b/drivers/spi/spi_txx9.c
index 19f7562..dfa024b 100644
--- a/drivers/spi/spi_txx9.c
+++ b/drivers/spi/spi_txx9.c
@@ -375,12 +375,10 @@ static int __init txx9spi_probe(struct platform_device *dev)
 	res = platform_get_resource(dev, IORESOURCE_MEM, 0);
 	if (!res)
 		goto exit_busy;
-	if (!devm_request_mem_region(&dev->dev,
-				     res->start, res->end - res->start + 1,
+	if (!devm_request_mem_region(&dev->dev, res->start, resource_size(res),
 				     "spi_txx9"))
 		goto exit_busy;
-	c->membase = devm_ioremap(&dev->dev,
-				  res->start, res->end - res->start + 1);
+	c->membase = devm_ioremap(&dev->dev, res->start, resource_size(res));
 	if (!c->membase)
 		goto exit_busy;
  

------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev

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

* Re: [PATCH] spi_txx9.c: use resource_size()
       [not found] ` <BD79186B4FD85F4B8E60E381CAEE19090200EA8F-KURmP/Qoe8Pmp66j18f85VaTQe2KTcn/@public.gmane.org>
@ 2009-12-16 17:04   ` Atsushi Nemoto
  0 siblings, 0 replies; 2+ messages in thread
From: Atsushi Nemoto @ 2009-12-16 17:04 UTC (permalink / raw)
  To: hartleys-3FF4nKcrg1dE2c76skzGb0EOCMrvLtNR
  Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

On Mon, 14 Dec 2009 17:43:42 -0500, "H Hartley Sweeten" <hartleys-3FF4nKcrg1dE2c76skzGb0EOCMrvLtNR@public.gmane.org> wrote:
> Use resource_size().
> 
> Signed-off-by: H Hartley Sweeten <hsweeten-3FF4nKcrg1dE2c76skzGb0EOCMrvLtNR@public.gmane.org>
> Cc: David Brownell <dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
> Cc: Atsushi Nemoto <anemo-7JcRY8pycbNHfZP73Gtkiw@public.gmane.org>

Thanks,

Acked-by: Atsushi Nemoto <anemo-7JcRY8pycbNHfZP73Gtkiw@public.gmane.org>

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 

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

end of thread, other threads:[~2009-12-16 17:04 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:43 [PATCH] spi_txx9.c: use resource_size() H Hartley Sweeten
     [not found] ` <BD79186B4FD85F4B8E60E381CAEE19090200EA8F-KURmP/Qoe8Pmp66j18f85VaTQe2KTcn/@public.gmane.org>
2009-12-16 17:04   ` Atsushi Nemoto

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).