Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 96278
b: refs/heads/master
c: 0305794
h: refs/heads/master
v: v3
  • Loading branch information
Paul Mundt committed May 8, 2008
1 parent e309f54 commit 03fc6ef
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ae8a5348acaefc5cb1f60199ded30900d445c986
refs/heads/master: 0305794c7a86f1b25281fb9109b76fc4578f6038
14 changes: 9 additions & 5 deletions trunk/drivers/rtc/rtc-sh.c
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ static int __devinit sh_rtc_probe(struct platform_device *pdev)
goto err_badres;
}

rtc->regbase = (void __iomem *)rtc->res->start;
rtc->regbase = ioremap_nocache(rtc->res->start, rtc->regsize);
if (unlikely(!rtc->regbase)) {
ret = -EINVAL;
goto err_badmap;
Expand All @@ -626,7 +626,7 @@ static int __devinit sh_rtc_probe(struct platform_device *pdev)
&sh_rtc_ops, THIS_MODULE);
if (IS_ERR(rtc->rtc_dev)) {
ret = PTR_ERR(rtc->rtc_dev);
goto err_badmap;
goto err_unmap;
}

rtc->capabilities = RTC_DEF_CAPABILITIES;
Expand All @@ -653,7 +653,7 @@ static int __devinit sh_rtc_probe(struct platform_device *pdev)
dev_err(&pdev->dev,
"request period IRQ failed with %d, IRQ %d\n", ret,
rtc->periodic_irq);
goto err_badmap;
goto err_unmap;
}

ret = request_irq(rtc->carry_irq, sh_rtc_interrupt, IRQF_DISABLED,
Expand All @@ -663,7 +663,7 @@ static int __devinit sh_rtc_probe(struct platform_device *pdev)
"request carry IRQ failed with %d, IRQ %d\n", ret,
rtc->carry_irq);
free_irq(rtc->periodic_irq, rtc);
goto err_badmap;
goto err_unmap;
}

ret = request_irq(rtc->alarm_irq, sh_rtc_alarm, IRQF_DISABLED,
Expand All @@ -674,7 +674,7 @@ static int __devinit sh_rtc_probe(struct platform_device *pdev)
rtc->alarm_irq);
free_irq(rtc->carry_irq, rtc);
free_irq(rtc->periodic_irq, rtc);
goto err_badmap;
goto err_unmap;
}

tmp = readb(rtc->regbase + RCR1);
Expand All @@ -684,6 +684,8 @@ static int __devinit sh_rtc_probe(struct platform_device *pdev)

return 0;

err_unmap:
iounmap(rtc->regbase);
err_badmap:
release_resource(rtc->res);
err_badres:
Expand All @@ -708,6 +710,8 @@ static int __devexit sh_rtc_remove(struct platform_device *pdev)

release_resource(rtc->res);

iounmap(rtc->regbase);

platform_set_drvdata(pdev, NULL);

kfree(rtc);
Expand Down

0 comments on commit 03fc6ef

Please sign in to comment.