aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/gadget/atmel_usba_udc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget/atmel_usba_udc.c
index 4e970cf0e29a..976822f50c70 100644
--- a/drivers/usb/gadget/atmel_usba_udc.c
+++ b/drivers/usb/gadget/atmel_usba_udc.c
@@ -1914,14 +1914,14 @@ static int __init usba_udc_probe(struct platform_device *pdev)
1914 udc->vbus_pin = -ENODEV; 1914 udc->vbus_pin = -ENODEV;
1915 1915
1916 ret = -ENOMEM; 1916 ret = -ENOMEM;
1917 udc->regs = ioremap(regs->start, regs->end - regs->start + 1); 1917 udc->regs = ioremap(regs->start, resource_size(regs));
1918 if (!udc->regs) { 1918 if (!udc->regs) {
1919 dev_err(&pdev->dev, "Unable to map I/O memory, aborting.\n"); 1919 dev_err(&pdev->dev, "Unable to map I/O memory, aborting.\n");
1920 goto err_map_regs; 1920 goto err_map_regs;
1921 } 1921 }
1922 dev_info(&pdev->dev, "MMIO registers at 0x%08lx mapped at %p\n", 1922 dev_info(&pdev->dev, "MMIO registers at 0x%08lx mapped at %p\n",
1923 (unsigned long)regs->start, udc->regs); 1923 (unsigned long)regs->start, udc->regs);
1924 udc->fifo = ioremap(fifo->start, fifo->end - fifo->start + 1); 1924 udc->fifo = ioremap(fifo->start, resource_size(fifo));
1925 if (!udc->fifo) { 1925 if (!udc->fifo) {
1926 dev_err(&pdev->dev, "Unable to map FIFO, aborting.\n"); 1926 dev_err(&pdev->dev, "Unable to map FIFO, aborting.\n");
1927 goto err_map_fifo; 1927 goto err_map_fifo;