netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dm9000: Use resource_size instead of private macro
@ 2009-09-09 11:07 Tobias Klauser
  2009-09-09 11:07 ` [PATCH] dm9000: Remove unnecessary memset of netdev private data Tobias Klauser
  2009-09-10  1:55 ` [PATCH] dm9000: Use resource_size instead of private macro David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Tobias Klauser @ 2009-09-09 11:07 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, Tobias Klauser

The macro res_size in drivers/net/dm9000.c is a copy of resource_size in
linux/ioport.h. Remove the function and use resource_size instead.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
---
 drivers/net/dm9000.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/dm9000.c b/drivers/net/dm9000.c
index dd771de..00a9db8 100644
--- a/drivers/net/dm9000.c
+++ b/drivers/net/dm9000.c
@@ -1185,8 +1185,6 @@ static const struct net_device_ops dm9000_netdev_ops = {
 #endif
 };
 
-#define res_size(_r) (((_r)->end - (_r)->start) + 1)
-
 /*
  * Search DM9000 board, allocate space and register it
  */
@@ -1236,7 +1234,7 @@ dm9000_probe(struct platform_device *pdev)
 		goto out;
 	}
 
-	iosize = res_size(db->addr_res);
+	iosize = resource_size(db->addr_res);
 	db->addr_req = request_mem_region(db->addr_res->start, iosize,
 					  pdev->name);
 
@@ -1254,7 +1252,7 @@ dm9000_probe(struct platform_device *pdev)
 		goto out;
 	}
 
-	iosize = res_size(db->data_res);
+	iosize = resource_size(db->data_res);
 	db->data_req = request_mem_region(db->data_res->start, iosize,
 					  pdev->name);
 
-- 
1.6.0.4


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

end of thread, other threads:[~2009-09-10  1:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-09 11:07 [PATCH] dm9000: Use resource_size instead of private macro Tobias Klauser
2009-09-09 11:07 ` [PATCH] dm9000: Remove unnecessary memset of netdev private data Tobias Klauser
2009-09-10  1:55   ` David Miller
2009-09-10  1:55 ` [PATCH] dm9000: Use resource_size instead of private macro David Miller

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