Skip to content

Commit

Permalink
dm9000: Use resource_size instead of private macro
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
tklauser authored and davem330 committed Sep 10, 2009
1 parent 07fcb04 commit ec282e9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/net/dm9000.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down Expand Up @@ -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);

Expand All @@ -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);

Expand Down

0 comments on commit ec282e9

Please sign in to comment.