diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2008-09-04 09:07:22 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-09-05 12:02:30 -0400 |
commit | 55c381e4896be2611da87088acfad74b361239ab (patch) | |
tree | 1515420c29dbbfd987f0157f16d8bb8cac938c15 /drivers/usb/host/ohci-omap.c | |
parent | 690b5a13b27ba3bb2c9d61c1f4018c5074b591e6 (diff) |
[ARM] omap: convert OMAP drivers to use ioremap()
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/usb/host/ohci-omap.c')
-rw-r--r-- | drivers/usb/host/ohci-omap.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/usb/host/ohci-omap.c b/drivers/usb/host/ohci-omap.c index 95b3ec89c126..522185629624 100644 --- a/drivers/usb/host/ohci-omap.c +++ b/drivers/usb/host/ohci-omap.c | |||
@@ -344,7 +344,12 @@ static int usb_hcd_omap_probe (const struct hc_driver *driver, | |||
344 | goto err1; | 344 | goto err1; |
345 | } | 345 | } |
346 | 346 | ||
347 | hcd->regs = (void __iomem *) (int) IO_ADDRESS(hcd->rsrc_start); | 347 | hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len); |
348 | if (!hcd->regs) { | ||
349 | dev_err(&pdev->dev, "can't ioremap OHCI HCD\n"); | ||
350 | retval = -ENOMEM; | ||
351 | goto err2; | ||
352 | } | ||
348 | 353 | ||
349 | ohci = hcd_to_ohci(hcd); | 354 | ohci = hcd_to_ohci(hcd); |
350 | ohci_hcd_init(ohci); | 355 | ohci_hcd_init(ohci); |
@@ -355,11 +360,11 @@ static int usb_hcd_omap_probe (const struct hc_driver *driver, | |||
355 | irq = platform_get_irq(pdev, 0); | 360 | irq = platform_get_irq(pdev, 0); |
356 | if (irq < 0) { | 361 | if (irq < 0) { |
357 | retval = -ENXIO; | 362 | retval = -ENXIO; |
358 | goto err2; | 363 | goto err3; |
359 | } | 364 | } |
360 | retval = usb_add_hcd(hcd, irq, IRQF_DISABLED); | 365 | retval = usb_add_hcd(hcd, irq, IRQF_DISABLED); |
361 | if (retval) | 366 | if (retval) |
362 | goto err2; | 367 | goto err3; |
363 | 368 | ||
364 | host_initialized = 1; | 369 | host_initialized = 1; |
365 | 370 | ||
@@ -367,6 +372,8 @@ static int usb_hcd_omap_probe (const struct hc_driver *driver, | |||
367 | omap_ohci_clock_power(0); | 372 | omap_ohci_clock_power(0); |
368 | 373 | ||
369 | return 0; | 374 | return 0; |
375 | err3: | ||
376 | iounmap(hcd->regs); | ||
370 | err2: | 377 | err2: |
371 | release_mem_region(hcd->rsrc_start, hcd->rsrc_len); | 378 | release_mem_region(hcd->rsrc_start, hcd->rsrc_len); |
372 | err1: | 379 | err1: |
@@ -401,6 +408,7 @@ usb_hcd_omap_remove (struct usb_hcd *hcd, struct platform_device *pdev) | |||
401 | } | 408 | } |
402 | if (machine_is_omap_osk()) | 409 | if (machine_is_omap_osk()) |
403 | omap_free_gpio(9); | 410 | omap_free_gpio(9); |
411 | iounmap(hcd->regs); | ||
404 | release_mem_region(hcd->rsrc_start, hcd->rsrc_len); | 412 | release_mem_region(hcd->rsrc_start, hcd->rsrc_len); |
405 | usb_put_hcd(hcd); | 413 | usb_put_hcd(hcd); |
406 | clk_put(usb_dc_ck); | 414 | clk_put(usb_dc_ck); |