diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-05-09 11:07:58 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-05-09 11:07:58 -0400 |
commit | a9545ee3c8153e133556aaaa8110337ca3f864dc (patch) | |
tree | 0a172f74b37b239d850b8b363683e191511bc87a /drivers/rtc | |
parent | c20b4b69f774896623a8ad87d974982bc89af7ed (diff) | |
parent | 9731e287e08b804592191d8bffaad023154af2aa (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (37 commits)
SH: catch negative denormal_subf1() retval in denormal_add()
sh: Fix DMAC base address for SH7709S
sh: update smc91x platform data for se7206.
sh: Stub in cpu_to_node() and friends for NUMA build.
sh: intc register modify fix
sh: no high level trigger on some sh3 cpus
sh: clean up sh7710 and sh7720 intc tables
sh: add interrupt ack code to sh3
sh: unify external irq pin code for sh3
sh-sci: avoid writing to nonexistent registers
sh-sci: sh7722 lacks scsptr registers
sh-sci: improve sh7722 support
sh: reset hardware from early printk
sh: drain and wait for early printk
sh: use sci_out() for early printk
sh: add memory resources to /proc/iomem
sh: add kernel bss resource
sh: fix sh7705 interrupt vector typo
sh: update smc91x platform data for se7722
sh: update smc91x platform data for MigoR
...
Diffstat (limited to 'drivers/rtc')
-rw-r--r-- | drivers/rtc/rtc-sh.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/rtc/rtc-sh.c b/drivers/rtc/rtc-sh.c index 110699bb4787..1f88e9e914ec 100644 --- a/drivers/rtc/rtc-sh.c +++ b/drivers/rtc/rtc-sh.c | |||
@@ -616,7 +616,7 @@ static int __devinit sh_rtc_probe(struct platform_device *pdev) | |||
616 | goto err_badres; | 616 | goto err_badres; |
617 | } | 617 | } |
618 | 618 | ||
619 | rtc->regbase = (void __iomem *)rtc->res->start; | 619 | rtc->regbase = ioremap_nocache(rtc->res->start, rtc->regsize); |
620 | if (unlikely(!rtc->regbase)) { | 620 | if (unlikely(!rtc->regbase)) { |
621 | ret = -EINVAL; | 621 | ret = -EINVAL; |
622 | goto err_badmap; | 622 | goto err_badmap; |
@@ -626,7 +626,7 @@ static int __devinit sh_rtc_probe(struct platform_device *pdev) | |||
626 | &sh_rtc_ops, THIS_MODULE); | 626 | &sh_rtc_ops, THIS_MODULE); |
627 | if (IS_ERR(rtc->rtc_dev)) { | 627 | if (IS_ERR(rtc->rtc_dev)) { |
628 | ret = PTR_ERR(rtc->rtc_dev); | 628 | ret = PTR_ERR(rtc->rtc_dev); |
629 | goto err_badmap; | 629 | goto err_unmap; |
630 | } | 630 | } |
631 | 631 | ||
632 | rtc->capabilities = RTC_DEF_CAPABILITIES; | 632 | rtc->capabilities = RTC_DEF_CAPABILITIES; |
@@ -653,7 +653,7 @@ static int __devinit sh_rtc_probe(struct platform_device *pdev) | |||
653 | dev_err(&pdev->dev, | 653 | dev_err(&pdev->dev, |
654 | "request period IRQ failed with %d, IRQ %d\n", ret, | 654 | "request period IRQ failed with %d, IRQ %d\n", ret, |
655 | rtc->periodic_irq); | 655 | rtc->periodic_irq); |
656 | goto err_badmap; | 656 | goto err_unmap; |
657 | } | 657 | } |
658 | 658 | ||
659 | ret = request_irq(rtc->carry_irq, sh_rtc_interrupt, IRQF_DISABLED, | 659 | ret = request_irq(rtc->carry_irq, sh_rtc_interrupt, IRQF_DISABLED, |
@@ -663,7 +663,7 @@ static int __devinit sh_rtc_probe(struct platform_device *pdev) | |||
663 | "request carry IRQ failed with %d, IRQ %d\n", ret, | 663 | "request carry IRQ failed with %d, IRQ %d\n", ret, |
664 | rtc->carry_irq); | 664 | rtc->carry_irq); |
665 | free_irq(rtc->periodic_irq, rtc); | 665 | free_irq(rtc->periodic_irq, rtc); |
666 | goto err_badmap; | 666 | goto err_unmap; |
667 | } | 667 | } |
668 | 668 | ||
669 | ret = request_irq(rtc->alarm_irq, sh_rtc_alarm, IRQF_DISABLED, | 669 | ret = request_irq(rtc->alarm_irq, sh_rtc_alarm, IRQF_DISABLED, |
@@ -674,7 +674,7 @@ static int __devinit sh_rtc_probe(struct platform_device *pdev) | |||
674 | rtc->alarm_irq); | 674 | rtc->alarm_irq); |
675 | free_irq(rtc->carry_irq, rtc); | 675 | free_irq(rtc->carry_irq, rtc); |
676 | free_irq(rtc->periodic_irq, rtc); | 676 | free_irq(rtc->periodic_irq, rtc); |
677 | goto err_badmap; | 677 | goto err_unmap; |
678 | } | 678 | } |
679 | 679 | ||
680 | tmp = readb(rtc->regbase + RCR1); | 680 | tmp = readb(rtc->regbase + RCR1); |
@@ -684,6 +684,8 @@ static int __devinit sh_rtc_probe(struct platform_device *pdev) | |||
684 | 684 | ||
685 | return 0; | 685 | return 0; |
686 | 686 | ||
687 | err_unmap: | ||
688 | iounmap(rtc->regbase); | ||
687 | err_badmap: | 689 | err_badmap: |
688 | release_resource(rtc->res); | 690 | release_resource(rtc->res); |
689 | err_badres: | 691 | err_badres: |
@@ -708,6 +710,8 @@ static int __devexit sh_rtc_remove(struct platform_device *pdev) | |||
708 | 710 | ||
709 | release_resource(rtc->res); | 711 | release_resource(rtc->res); |
710 | 712 | ||
713 | iounmap(rtc->regbase); | ||
714 | |||
711 | platform_set_drvdata(pdev, NULL); | 715 | platform_set_drvdata(pdev, NULL); |
712 | 716 | ||
713 | kfree(rtc); | 717 | kfree(rtc); |