USB: pxa27x_udc.c: use resource_size()
authorH Hartley Sweeten <hartleys@visionengravers.com>
Mon, 14 Dec 2009 23:05:02 +0000 (18:05 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 2 Mar 2010 22:53:16 +0000 (14:53 -0800)
Use resource_size().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/gadget/pxa27x_udc.c

index d4c6eec70edc63eca4dddcb88cf0ddc7448d5fab..e8b4b6992a9dbc48e96add76f4f89b55daa89866 100644 (file)
@@ -2446,7 +2446,7 @@ static int __init pxa_udc_probe(struct platform_device *pdev)
        }
 
        retval = -ENOMEM;
-       udc->regs = ioremap(regs->start, regs->end - regs->start + 1);
+       udc->regs = ioremap(regs->start, resource_size(regs));
        if (!udc->regs) {
                dev_err(&pdev->dev, "Unable to map UDC I/O memory\n");
                goto err_map;