Blackfin RTC Driver: do all initialization before we register the rtc and make it...
authorMike Frysinger <[email protected]>
Wed, 20 Aug 2008 21:09:02 +0000 (14:09 -0700)
committerLinus Torvalds <[email protected]>
Wed, 20 Aug 2008 22:40:30 +0000 (15:40 -0700)
Signed-off-by: Mike Frysinger <[email protected]>
Signed-off-by: Bryan Wu <[email protected]>
Cc: Alessandro Zummo <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
drivers/rtc/rtc-bfin.c

index 51741dc12911f6c0133cf6a3bc3134153be69410..9d2da1cd7773a149ecee1a532a14733bb074ab16 100644 (file)
@@ -371,6 +371,7 @@ static int __devinit bfin_rtc_probe(struct platform_device *pdev)
        if (unlikely(!rtc))
                return -ENOMEM;
        platform_set_drvdata(pdev, rtc);
+       device_init_wakeup(dev, 1);
 
        /* Grab the IRQ and init the hardware */
        ret = request_irq(IRQ_RTC, bfin_rtc_interrupt, IRQF_SHARED, pdev->name, dev);
@@ -386,8 +387,6 @@ static int __devinit bfin_rtc_probe(struct platform_device *pdev)
                goto err_irq;
        }
 
-       device_init_wakeup(dev, 1);
-
        return 0;
 
  err_irq: