diff options
Diffstat (limited to 'drivers/rtc')
-rw-r--r-- | drivers/rtc/rtc-omap.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/rtc/rtc-omap.c b/drivers/rtc/rtc-omap.c index 73377b0d65da..e72b523c79a5 100644 --- a/drivers/rtc/rtc-omap.c +++ b/drivers/rtc/rtc-omap.c | |||
@@ -429,13 +429,14 @@ fail1: | |||
429 | fail0: | 429 | fail0: |
430 | iounmap(rtc_base); | 430 | iounmap(rtc_base); |
431 | fail: | 431 | fail: |
432 | release_resource(mem); | 432 | release_mem_region(mem->start, resource_size(mem)); |
433 | return -EIO; | 433 | return -EIO; |
434 | } | 434 | } |
435 | 435 | ||
436 | static int __exit omap_rtc_remove(struct platform_device *pdev) | 436 | static int __exit omap_rtc_remove(struct platform_device *pdev) |
437 | { | 437 | { |
438 | struct rtc_device *rtc = platform_get_drvdata(pdev); | 438 | struct rtc_device *rtc = platform_get_drvdata(pdev); |
439 | struct resource *mem = dev_get_drvdata(&rtc->dev); | ||
439 | 440 | ||
440 | device_init_wakeup(&pdev->dev, 0); | 441 | device_init_wakeup(&pdev->dev, 0); |
441 | 442 | ||
@@ -447,8 +448,9 @@ static int __exit omap_rtc_remove(struct platform_device *pdev) | |||
447 | if (omap_rtc_timer != omap_rtc_alarm) | 448 | if (omap_rtc_timer != omap_rtc_alarm) |
448 | free_irq(omap_rtc_alarm, rtc); | 449 | free_irq(omap_rtc_alarm, rtc); |
449 | 450 | ||
450 | release_resource(dev_get_drvdata(&rtc->dev)); | ||
451 | rtc_device_unregister(rtc); | 451 | rtc_device_unregister(rtc); |
452 | iounmap(rtc_base); | ||
453 | release_mem_region(mem->start, resource_size(mem)); | ||
452 | return 0; | 454 | return 0; |
453 | } | 455 | } |
454 | 456 | ||