Skip to contentSkip to conversation

wireless:ath: use resource_size() help function

PATCH New Shan Wei 2 participants 2 messages Mar 7, 2011

Subsystems (2)
lore
Share & tools
lore

Shan Wei

author
#0 lore raw

PATCH 1/1 wireless:ath: use resource_size() help function

---
 drivers/net/wireless/ath/ath5k/ahb.c |    2 +-
 drivers/net/wireless/ath/ath9k/ahb.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/ath/ath5k/ahb.c +1 -1
index ae84b86..82324e9 100644
@@ -93,7 +93,7 @@ static int ath_ahb_probe(struct platform_device *pdev)
 		goto err_out;
 	}
 
-	mem = ioremap_nocache(res->start, res->end - res->start + 1);
+	mem = ioremap_nocache(res->start, resource_size(res));
 	if (mem == NULL) {
 		dev_err(&pdev->dev, "ioremap failed\n");
 		ret = -ENOMEM;
drivers/net/wireless/ath/ath9k/ahb.c +1 -1
index 9936721..9cb0efa 100644
@@ -75,7 +75,7 @@ static int ath_ahb_probe(struct platform_device *pdev)
 		goto err_out;
 	}
 
-	mem = ioremap_nocache(res->start, res->end - res->start + 1);
+	mem = ioremap_nocache(res->start, resource_size(res));
 	if (mem == NULL) {
 		dev_err(&pdev->dev, "ioremap failed\n");
 		ret = -ENOMEM;
Signature · 1 line
1.6.3.3
#1 lore raw

PATCH 1/1 wireless:ath: use resource_size() help function

Quoted 3 lines · Shan Wei

ACK.

Quoted 23 lines
---
 drivers/net/wireless/ath/ath5k/ahb.c |    2 +-
 drivers/net/wireless/ath/ath9k/ahb.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/ath/ath5k/ahb.c +1 -1
index ae84b86..82324e9 100644
@@ -93,7 +93,7 @@ static int ath_ahb_probe(struct platform_device *pdev)
 		goto err_out;
 	}
 
-	mem = ioremap_nocache(res->start, res->end - res->start + 1);
+	mem = ioremap_nocache(res->start, resource_size(res));
 	if (mem == NULL) {
 		dev_err(&pdev->dev, "ioremap failed\n");
 		ret = -ENOMEM;
drivers/net/wireless/ath/ath9k/ahb.c +0 -0
index 9936721..9cb0efa 100644

drivers/net/wireless/ath/ath9k/ahb.c static int ath_ahb_probe(struct platform_device *pdev) · line 81

Quoted 8 lines
drivers/net/wireless/ath/ath9k/ahb.c +1 -1
@@ -75,7 +75,7 @@ static int ath_ahb_probe(struct platform_device *pdev)
 		goto err_out;
 	}
 
-	mem = ioremap_nocache(res->start, res->end - res->start + 1);
+	mem = ioremap_nocache(res->start, resource_size(res));
 	if (mem == NULL) {
 		dev_err(&pdev->dev, "ioremap failed\n");
 		ret = -ENOMEM;

thanks,

Signature · 1 line
js