aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/gadget
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-10-11 11:24:25 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-10-11 11:24:25 -0700
commitc6c599272374a358b4171d50ffd605e6cf7b481c (patch)
tree8ce918c724c39e88e96d7abf243955718e71da9a /drivers/usb/gadget
parentff945afb10bc9d81f395da474fa2aa88ee620e48 (diff)
parent40d28582316d8dcb535c359a14b71cb910ad6e73 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (32 commits) USB: serial: no unnecessary GFP_ATOMIC in oti6858 USB: serial: fix race between unthrottle and completion handler in visor USB: serial: fix assumption that throttle/unthrottle cannot sleep USB: serial: fix race between unthrottle and completion handler in symbolserial USB: serial: fix race between unthrottle and completion handler in opticon USB: ehci: Fix isoc scheduling boundary checking. USB: storage: When a device returns no sense data, call it a Hardware Error USB: small fix in error case of suspend in generic usbserial code USB: visor: fix trivial accounting bug in visor driver USB: Fix throttling in generic usbserial driver USB: cp210x: Add support for the DW700 UART USB: ipaq: fix oops when device is plugged in USB: isp1362: fix build warnings on 64-bit systems USB: gadget: imx_udc: Use resource size USB: storage: iRiver P7 UNUSUAL_DEV patch USB: musb: make HAVE_CLK support optional USB: xhci: Fix dropping endpoints from the xHC schedule. USB: xhci: Don't wait for a disable slot cmd when HC dies. USB: xhci: Handle canceled URBs when HC dies. USB: xhci: Stop debugging polling loop when HC dies. ...
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r--drivers/usb/gadget/imx_udc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/usb/gadget/imx_udc.c b/drivers/usb/gadget/imx_udc.c
index c52a681f376..01ee0b9bc95 100644
--- a/drivers/usb/gadget/imx_udc.c
+++ b/drivers/usb/gadget/imx_udc.c
@@ -1402,7 +1402,8 @@ static int __init imx_udc_probe(struct platform_device *pdev)
struct clk *clk;
void __iomem *base;
int ret = 0;
- int i, res_size;
+ int i;
+ resource_size_t res_size;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) {
@@ -1416,7 +1417,7 @@ static int __init imx_udc_probe(struct platform_device *pdev)
return -ENODEV;
}
- res_size = res->end - res->start + 1;
+ res_size = resource_size(res);
if (!request_mem_region(res->start, res_size, res->name)) {
dev_err(&pdev->dev, "can't allocate %d bytes at %d address\n",
res_size, res->start);
@@ -1527,8 +1528,7 @@ static int __exit imx_udc_remove(struct platform_device *pdev)
clk_disable(imx_usb->clk);
iounmap(imx_usb->base);
- release_mem_region(imx_usb->res->start,
- imx_usb->res->end - imx_usb->res->start + 1);
+ release_mem_region(imx_usb->res->start, resource_size(imx_usb->res));
if (pdata->exit)
pdata->exit(&pdev->dev);