USB: isp116x-hcd - use resource_size instead of defining its own resource_len macro
authorAxel Lin <axel.lin@gmail.com>
Fri, 15 Oct 2010 05:26:21 +0000 (13:26 +0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 22 Oct 2010 17:22:14 +0000 (10:22 -0700)
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/host/isp116x-hcd.c

index d9e82123de2a52fce537f8252e9f828f02fda181..0da7fc05f453756415e16299947bea7142408f58 100644 (file)
@@ -1557,8 +1557,6 @@ static int isp116x_remove(struct platform_device *pdev)
        return 0;
 }
 
-#define resource_len(r) (((r)->end - (r)->start) + 1)
-
 static int __devinit isp116x_probe(struct platform_device *pdev)
 {
        struct usb_hcd *hcd;
@@ -1597,7 +1595,7 @@ static int __devinit isp116x_probe(struct platform_device *pdev)
                ret = -EBUSY;
                goto err1;
        }
-       addr_reg = ioremap(addr->start, resource_len(addr));
+       addr_reg = ioremap(addr->start, resource_size(addr));
        if (addr_reg == NULL) {
                ret = -ENOMEM;
                goto err2;
@@ -1606,7 +1604,7 @@ static int __devinit isp116x_probe(struct platform_device *pdev)
                ret = -EBUSY;
                goto err3;
        }
-       data_reg = ioremap(data->start, resource_len(data));
+       data_reg = ioremap(data->start, resource_size(data));
        if (data_reg == NULL) {
                ret = -ENOMEM;
                goto err4;