aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShan Wei <shanwei@cn.fujitsu.com>2011-03-07 02:18:11 -0500
committerJohn W. Linville <linville@tuxdriver.com>2011-03-07 13:51:04 -0500
commit9ac4793359f374e4e9ec6a71b65677096c024acd (patch)
treedea4cefa8b329e2bbd7678742b3066d3daec19f9
parent2d0123a5d635e336dbab21eba62e8dd4eb3e39a0 (diff)
wireless:ath: use resource_size() help function
Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/ath/ath5k/ahb.c2
-rw-r--r--drivers/net/wireless/ath/ath9k/ahb.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath5k/ahb.c b/drivers/net/wireless/ath/ath5k/ahb.c
index ae84b86c3bf2..82324e98efef 100644
--- a/drivers/net/wireless/ath/ath5k/ahb.c
+++ b/drivers/net/wireless/ath/ath5k/ahb.c
@@ -93,7 +93,7 @@ static int ath_ahb_probe(struct platform_device *pdev)
93 goto err_out; 93 goto err_out;
94 } 94 }
95 95
96 mem = ioremap_nocache(res->start, res->end - res->start + 1); 96 mem = ioremap_nocache(res->start, resource_size(res));
97 if (mem == NULL) { 97 if (mem == NULL) {
98 dev_err(&pdev->dev, "ioremap failed\n"); 98 dev_err(&pdev->dev, "ioremap failed\n");
99 ret = -ENOMEM; 99 ret = -ENOMEM;
diff --git a/drivers/net/wireless/ath/ath9k/ahb.c b/drivers/net/wireless/ath/ath9k/ahb.c
index 993672105963..9cb0efa9b4c0 100644
--- a/drivers/net/wireless/ath/ath9k/ahb.c
+++ b/drivers/net/wireless/ath/ath9k/ahb.c
@@ -75,7 +75,7 @@ static int ath_ahb_probe(struct platform_device *pdev)
75 goto err_out; 75 goto err_out;
76 } 76 }
77 77
78 mem = ioremap_nocache(res->start, res->end - res->start + 1); 78 mem = ioremap_nocache(res->start, resource_size(res));
79 if (mem == NULL) { 79 if (mem == NULL) {
80 dev_err(&pdev->dev, "ioremap failed\n"); 80 dev_err(&pdev->dev, "ioremap failed\n");
81 ret = -ENOMEM; 81 ret = -ENOMEM;