Patchwork [2/3] rtc: pxa: fix alarm can't wake up system issue

login
register
mail settings
Submitter Leo Song
Date Nov. 8, 2012, 1:45 p.m.
Message ID <1352382333-13979-2-git-send-email-liangs@marvell.com>
Download mbox | patch
Permalink /patch/197839/
State New
Headers show

Comments

Leo Song - Nov. 8, 2012, 1:45 p.m.
From: Leo Song <liangs@marvell.com>

fix alarm can't wake up system issue

Change-Id: If14bc02712b14d2ad760bcc19b39a4bffee357a6
Signed-off-by: Leo Song <liangs@marvell.com>

Patch

diff --git a/drivers/rtc/rtc-pxa.c b/drivers/rtc/rtc-pxa.c
index 2695e55..dbc24e9 100644
--- a/drivers/rtc/rtc-pxa.c
+++ b/drivers/rtc/rtc-pxa.c
@@ -309,8 +309,6 @@  static int pxa_rtc_proc(struct device *dev, struct seq_file *seq)
 }
 
 static const struct rtc_class_ops pxa_rtc_ops = {
-	.open = pxa_rtc_open,
-	.release = pxa_rtc_release,
 	.read_time = pxa_rtc_read_time,
 	.set_time = pxa_rtc_set_time,
 	.read_alarm = pxa_rtc_read_alarm,
@@ -350,7 +348,7 @@  static int __init pxa_rtc_probe(struct platform_device *pdev)
 		dev_err(dev, "No alarm IRQ resource defined\n");
 		goto err_ress;
 	}
-
+	pxa_rtc_open(dev);
 	ret = -ENOMEM;
 	pxa_rtc->base = ioremap(pxa_rtc->ress->start,
 				resource_size(pxa_rtc->ress));
@@ -396,6 +394,9 @@  static int __exit pxa_rtc_remove(struct platform_device *pdev)
 {
 	struct pxa_rtc *pxa_rtc = platform_get_drvdata(pdev);
 
+	struct device *dev = &pdev->dev;
+	pxa_rtc_release(dev);
+
 	rtc_device_unregister(pxa_rtc->rtc);
 
 	spin_lock_irq(&pxa_rtc->lock);