aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/r8a66597-hcd.c
diff options
context:
space:
mode:
authorMagnus Damm <damm@igel.co.jp>2008-11-13 01:46:37 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2009-01-07 12:59:53 -0500
commit0a2e5b9b8a3d205b565dec18d6fe39ef1aed75cc (patch)
tree864af256f1806a809072b40db8bb2f1e48bd2d29 /drivers/usb/host/r8a66597-hcd.c
parent3a407e7391767898027eb7030c41c78ebc7a785d (diff)
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/host/r8a66597-hcd.c')
-rw-r--r--drivers/usb/host/r8a66597-hcd.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/usb/host/r8a66597-hcd.c b/drivers/usb/host/r8a66597-hcd.c
index c21f14e0666..319041205b5 100644
--- a/drivers/usb/host/r8a66597-hcd.c
+++ b/drivers/usb/host/r8a66597-hcd.c
@@ -2275,7 +2275,6 @@ static int __init_or_module r8a66597_remove(struct platform_device *pdev)
2275 return 0; 2275 return 0;
2276} 2276}
2277 2277
2278#define resource_len(r) (((r)->end - (r)->start) + 1)
2279static int __init r8a66597_probe(struct platform_device *pdev) 2278static int __init r8a66597_probe(struct platform_device *pdev)
2280{ 2279{
2281#if defined(CONFIG_SUPERH_ON_CHIP_R8A66597) && defined(CONFIG_HAVE_CLK) 2280#if defined(CONFIG_SUPERH_ON_CHIP_R8A66597) && defined(CONFIG_HAVE_CLK)
@@ -2296,11 +2295,10 @@ static int __init r8a66597_probe(struct platform_device *pdev)
2296 goto clean_up; 2295 goto clean_up;
2297 } 2296 }
2298 2297
2299 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, 2298 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
2300 (char *)hcd_name);
2301 if (!res) { 2299 if (!res) {
2302 ret = -ENODEV; 2300 ret = -ENODEV;
2303 dev_err(&pdev->dev, "platform_get_resource_byname error.\n"); 2301 dev_err(&pdev->dev, "platform_get_resource error.\n");
2304 goto clean_up; 2302 goto clean_up;
2305 } 2303 }
2306 2304
@@ -2315,7 +2313,7 @@ static int __init r8a66597_probe(struct platform_device *pdev)
2315 irq = ires->start; 2313 irq = ires->start;
2316 irq_trigger = ires->flags & IRQF_TRIGGER_MASK; 2314 irq_trigger = ires->flags & IRQF_TRIGGER_MASK;
2317 2315
2318 reg = ioremap(res->start, resource_len(res)); 2316 reg = ioremap(res->start, resource_size(res));
2319 if (reg == NULL) { 2317 if (reg == NULL) {
2320 ret = -ENOMEM; 2318 ret = -ENOMEM;
2321 dev_err(&pdev->dev, "ioremap error.\n"); 2319 dev_err(&pdev->dev, "ioremap error.\n");