diff --git a/drivers/rtc/rtc-armada38x.c b/drivers/rtc/rtc-armada38x.c index 4b62d1a875e43eb09bf4631f7695f31dda9bfa6d..2b08cac62f07a5c6fed07b0598025234befe2c18 100644 --- a/drivers/rtc/rtc-armada38x.c +++ b/drivers/rtc/rtc-armada38x.c @@ -88,7 +88,7 @@ static int armada38x_rtc_set_time(struct device *dev, struct rtc_time *tm) { struct armada38x_rtc *rtc = dev_get_drvdata(dev); int ret = 0; - unsigned long time, flags; + unsigned long time; ret = rtc_tm_to_time(tm, &time); diff --git a/drivers/rtc/rtc-mt6397.c b/drivers/rtc/rtc-mt6397.c index c0090b698ff363732b2e1b0a727de001bc6c26a6..eab230be5a54fdfcfd9c41f39e0d9f1cb515a9e4 100644 --- a/drivers/rtc/rtc-mt6397.c +++ b/drivers/rtc/rtc-mt6397.c @@ -343,6 +343,8 @@ static int mtk_rtc_probe(struct platform_device *pdev) goto out_dispose_irq; } + device_init_wakeup(&pdev->dev, 1); + rtc->rtc_dev = rtc_device_register("mt6397-rtc", &pdev->dev, &mtk_rtc_ops, THIS_MODULE); if (IS_ERR(rtc->rtc_dev)) { @@ -351,8 +353,6 @@ static int mtk_rtc_probe(struct platform_device *pdev) goto out_free_irq; } - device_init_wakeup(&pdev->dev, 1); - return 0; out_free_irq: