提交 ec282e92 编写于 作者: T Tobias Klauser 提交者: David S. Miller

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: NTobias Klauser <tklauser@distanz.ch>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 07fcb044
...@@ -1251,8 +1251,6 @@ static const struct net_device_ops dm9000_netdev_ops = { ...@@ -1251,8 +1251,6 @@ static const struct net_device_ops dm9000_netdev_ops = {
#endif #endif
}; };
#define res_size(_r) (((_r)->end - (_r)->start) + 1)
/* /*
* Search DM9000 board, allocate space and register it * Search DM9000 board, allocate space and register it
*/ */
...@@ -1301,7 +1299,7 @@ dm9000_probe(struct platform_device *pdev) ...@@ -1301,7 +1299,7 @@ dm9000_probe(struct platform_device *pdev)
goto out; 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, db->addr_req = request_mem_region(db->addr_res->start, iosize,
pdev->name); pdev->name);
...@@ -1319,7 +1317,7 @@ dm9000_probe(struct platform_device *pdev) ...@@ -1319,7 +1317,7 @@ dm9000_probe(struct platform_device *pdev)
goto out; 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, db->data_req = request_mem_region(db->data_res->start, iosize,
pdev->name); pdev->name);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册