diff options
author | Magnus Damm <damm@igel.co.jp> | 2008-11-13 15:46:37 +0900 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-01-07 09:59:53 -0800 |
commit | 0a2e5b9b8a3d205b565dec18d6fe39ef1aed75cc (patch) | |
tree | 864af256f1806a809072b40db8bb2f1e48bd2d29 /drivers/usb/gadget/m66592-udc.c | |
parent | 3a407e7391767898027eb7030c41c78ebc7a785d (diff) | |
download | blackbird-op-linux-0a2e5b9b8a3d205b565dec18d6fe39ef1aed75cc.tar.gz blackbird-op-linux-0a2e5b9b8a3d205b565dec18d6fe39ef1aed75cc.zip |
USB: m66592 and r8a66597 resource changes
Use the more common platform_get_resource() together with index instead
of depending on the resource name and platform_get_resource_by_name().
Replace the resource_len() implementation with resource_size().
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Acked-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/gadget/m66592-udc.c')
-rw-r--r-- | drivers/usb/gadget/m66592-udc.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/usb/gadget/m66592-udc.c b/drivers/usb/gadget/m66592-udc.c index 3a8879ec2061..43dcf9e1af6b 100644 --- a/drivers/usb/gadget/m66592-udc.c +++ b/drivers/usb/gadget/m66592-udc.c @@ -1546,8 +1546,6 @@ static void nop_completion(struct usb_ep *ep, struct usb_request *r) { } -#define resource_len(r) (((r)->end - (r)->start) + 1) - static int __init m66592_probe(struct platform_device *pdev) { struct resource *res; @@ -1560,11 +1558,10 @@ static int __init m66592_probe(struct platform_device *pdev) int ret = 0; int i; - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, - (char *)udc_name); + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); if (!res) { ret = -ENODEV; - pr_err("platform_get_resource_byname error.\n"); + pr_err("platform_get_resource error.\n"); goto clean_up; } @@ -1575,7 +1572,7 @@ static int __init m66592_probe(struct platform_device *pdev) goto clean_up; } - reg = ioremap(res->start, resource_len(res)); + reg = ioremap(res->start, resource_size(res)); if (reg == NULL) { ret = -ENOMEM; pr_err("ioremap error.\n"); |