aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-sh.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/rtc/rtc-sh.c')
-rw-r--r--drivers/rtc/rtc-sh.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/rtc/rtc-sh.c b/drivers/rtc/rtc-sh.c
index aaf9d6a337cc..5ed66acf8ca5 100644
--- a/drivers/rtc/rtc-sh.c
+++ b/drivers/rtc/rtc-sh.c
@@ -89,7 +89,9 @@ struct sh_rtc {
89 void __iomem *regbase; 89 void __iomem *regbase;
90 unsigned long regsize; 90 unsigned long regsize;
91 struct resource *res; 91 struct resource *res;
92 unsigned int alarm_irq, periodic_irq, carry_irq; 92 int alarm_irq;
93 int periodic_irq;
94 int carry_irq;
93 struct rtc_device *rtc_dev; 95 struct rtc_device *rtc_dev;
94 spinlock_t lock; 96 spinlock_t lock;
95 unsigned long capabilities; /* See asm-sh/rtc.h for cap bits */ 97 unsigned long capabilities; /* See asm-sh/rtc.h for cap bits */
@@ -578,7 +580,7 @@ static int __devinit sh_rtc_probe(struct platform_device *pdev)
578 580
579 /* get periodic/carry/alarm irqs */ 581 /* get periodic/carry/alarm irqs */
580 ret = platform_get_irq(pdev, 0); 582 ret = platform_get_irq(pdev, 0);
581 if (unlikely(ret < 0)) { 583 if (unlikely(ret <= 0)) {
582 ret = -ENOENT; 584 ret = -ENOENT;
583 dev_err(&pdev->dev, "No IRQ for period\n"); 585 dev_err(&pdev->dev, "No IRQ for period\n");
584 goto err_badres; 586 goto err_badres;
@@ -586,7 +588,7 @@ static int __devinit sh_rtc_probe(struct platform_device *pdev)
586 rtc->periodic_irq = ret; 588 rtc->periodic_irq = ret;
587 589
588 ret = platform_get_irq(pdev, 1); 590 ret = platform_get_irq(pdev, 1);
589 if (unlikely(ret < 0)) { 591 if (unlikely(ret <= 0)) {
590 ret = -ENOENT; 592 ret = -ENOENT;
591 dev_err(&pdev->dev, "No IRQ for carry\n"); 593 dev_err(&pdev->dev, "No IRQ for carry\n");
592 goto err_badres; 594 goto err_badres;
@@ -594,7 +596,7 @@ static int __devinit sh_rtc_probe(struct platform_device *pdev)
594 rtc->carry_irq = ret; 596 rtc->carry_irq = ret;
595 597
596 ret = platform_get_irq(pdev, 2); 598 ret = platform_get_irq(pdev, 2);
597 if (unlikely(ret < 0)) { 599 if (unlikely(ret <= 0)) {
598 ret = -ENOENT; 600 ret = -ENOENT;
599 dev_err(&pdev->dev, "No IRQ for alarm\n"); 601 dev_err(&pdev->dev, "No IRQ for alarm\n");
600 goto err_badres; 602 goto err_badres;