drm/omapdrm: Add gamma table support to DSS dispc
[deliverable/linux.git] / drivers / rtc / rtc-da9052.c
index 1ba4371cbc2d7868ebee5dd3136f3ee88b6143f3..a20bcf0e33cd10a1c0f43918c759f4d52856a07a 100644 (file)
@@ -302,6 +302,13 @@ static int da9052_rtc_probe(struct platform_device *pdev)
        if (ret != 0)
                rtc_err(rtc, "Failed to disable TICKS: %d\n", ret);
 
+       device_init_wakeup(&pdev->dev, true);
+       rtc->rtc = devm_rtc_device_register(&pdev->dev, pdev->name,
+                                      &da9052_rtc_ops, THIS_MODULE);
+
+       if (IS_ERR(rtc->rtc))
+               return PTR_ERR(rtc->rtc);
+
        ret = da9052_request_irq(rtc->da9052, DA9052_IRQ_ALARM, "ALM",
                                da9052_rtc_irq, rtc);
        if (ret != 0) {
@@ -309,11 +316,7 @@ static int da9052_rtc_probe(struct platform_device *pdev)
                return ret;
        }
 
-       device_init_wakeup(&pdev->dev, true);
-
-       rtc->rtc = devm_rtc_device_register(&pdev->dev, pdev->name,
-                                      &da9052_rtc_ops, THIS_MODULE);
-       return PTR_ERR_OR_ZERO(rtc->rtc);
+       return 0;
 }
 
 static struct platform_driver da9052_rtc_driver = {
This page took 0.028453 seconds and 5 git commands to generate.