diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2009-09-09 03:07:43 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-09-10 03:54:49 +0200 |
commit | ec282e9225be924479d4880b51f13524795bd8d3 (patch) | |
tree | b9f922e45a2d8fab4d095752d411880ebabc965a | |
parent | dm9000: Remove unnecessary memset of netdev private data (diff) | |
download | linux-ec282e9225be924479d4880b51f13524795bd8d3.tar.xz linux-ec282e9225be924479d4880b51f13524795bd8d3.zip |
dm9000: Use resource_size instead of private macro
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | 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 60de17689e64..31b8bef49d2e 100644 --- a/drivers/net/dm9000.c +++ b/drivers/net/dm9000.c @@ -1251,8 +1251,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 */ @@ -1301,7 +1299,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); @@ -1319,7 +1317,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); |