mv643xx_eth: fix unicast address filter corruption on mtu change
[safe/jmp/linux-2.6] / drivers / rtc / rtc-at32ap700x.c
index 2ef8cdf..e1ec33e 100644 (file)
@@ -205,7 +205,7 @@ static int __init at32_rtc_probe(struct platform_device *pdev)
 {
        struct resource *regs;
        struct rtc_at32ap700x *rtc;
-       int irq = -1;
+       int irq;
        int ret;
 
        rtc = kzalloc(sizeof(struct rtc_at32ap700x), GFP_KERNEL);
@@ -222,7 +222,7 @@ static int __init at32_rtc_probe(struct platform_device *pdev)
        }
 
        irq = platform_get_irq(pdev, 0);
-       if (irq < 0) {
+       if (irq <= 0) {
                dev_dbg(&pdev->dev, "could not get irq\n");
                ret = -ENXIO;
                goto out;
@@ -265,6 +265,7 @@ static int __init at32_rtc_probe(struct platform_device *pdev)
        }
 
        platform_set_drvdata(pdev, rtc);
+       device_init_wakeup(&pdev->dev, 1);
 
        dev_info(&pdev->dev, "Atmel RTC for AT32AP700x at %08lx irq %ld\n",
                        (unsigned long)rtc->regs, rtc->irq);
@@ -284,6 +285,8 @@ static int __exit at32_rtc_remove(struct platform_device *pdev)
 {
        struct rtc_at32ap700x *rtc = platform_get_drvdata(pdev);
 
+       device_init_wakeup(&pdev->dev, 0);
+
        free_irq(rtc->irq, rtc);
        iounmap(rtc->regs);
        rtc_device_unregister(rtc->rtc);