]> git.karo-electronics.de Git - linux-beck.git/commitdiff
wireless:ath: use resource_size() help function
authorShan Wei <shanwei@cn.fujitsu.com>
Mon, 7 Mar 2011 07:18:11 +0000 (15:18 +0800)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 7 Mar 2011 18:51:04 +0000 (13:51 -0500)
Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath5k/ahb.c
drivers/net/wireless/ath/ath9k/ahb.c

index ae84b86c3bf2e1c78b6e593935a1184d6d5a0acf..82324e98efefc0b669a6ea46de37b4c8f77776cb 100644 (file)
@@ -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;
index 99367210596309c6b1fdfaa0ea6d01db5a00cbed..9cb0efa9b4c0873710c99d28d7dbd6ab5feee696 100644 (file)
@@ -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;