diff options
Diffstat (limited to 'drivers/rtc/rtc-s3c.c')
-rw-r--r-- | drivers/rtc/rtc-s3c.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c index cf953ecbfca9..b80fa2882408 100644 --- a/drivers/rtc/rtc-s3c.c +++ b/drivers/rtc/rtc-s3c.c | |||
@@ -77,18 +77,20 @@ static irqreturn_t s3c_rtc_tickirq(int irq, void *id) | |||
77 | } | 77 | } |
78 | 78 | ||
79 | /* Update control registers */ | 79 | /* Update control registers */ |
80 | static void s3c_rtc_setaie(int to) | 80 | static int s3c_rtc_setaie(struct device *dev, unsigned int enabled) |
81 | { | 81 | { |
82 | unsigned int tmp; | 82 | unsigned int tmp; |
83 | 83 | ||
84 | pr_debug("%s: aie=%d\n", __func__, to); | 84 | pr_debug("%s: aie=%d\n", __func__, enabled); |
85 | 85 | ||
86 | tmp = readb(s3c_rtc_base + S3C2410_RTCALM) & ~S3C2410_RTCALM_ALMEN; | 86 | tmp = readb(s3c_rtc_base + S3C2410_RTCALM) & ~S3C2410_RTCALM_ALMEN; |
87 | 87 | ||
88 | if (to) | 88 | if (enabled) |
89 | tmp |= S3C2410_RTCALM_ALMEN; | 89 | tmp |= S3C2410_RTCALM_ALMEN; |
90 | 90 | ||
91 | writeb(tmp, s3c_rtc_base + S3C2410_RTCALM); | 91 | writeb(tmp, s3c_rtc_base + S3C2410_RTCALM); |
92 | |||
93 | return 0; | ||
92 | } | 94 | } |
93 | 95 | ||
94 | static int s3c_rtc_setpie(struct device *dev, int enabled) | 96 | static int s3c_rtc_setpie(struct device *dev, int enabled) |
@@ -308,7 +310,7 @@ static int s3c_rtc_setalarm(struct device *dev, struct rtc_wkalrm *alrm) | |||
308 | 310 | ||
309 | writeb(alrm_en, base + S3C2410_RTCALM); | 311 | writeb(alrm_en, base + S3C2410_RTCALM); |
310 | 312 | ||
311 | s3c_rtc_setaie(alrm->enabled); | 313 | s3c_rtc_setaie(dev, alrm->enabled); |
312 | 314 | ||
313 | return 0; | 315 | return 0; |
314 | } | 316 | } |
@@ -440,7 +442,7 @@ static int __devexit s3c_rtc_remove(struct platform_device *dev) | |||
440 | rtc_device_unregister(rtc); | 442 | rtc_device_unregister(rtc); |
441 | 443 | ||
442 | s3c_rtc_setpie(&dev->dev, 0); | 444 | s3c_rtc_setpie(&dev->dev, 0); |
443 | s3c_rtc_setaie(0); | 445 | s3c_rtc_setaie(&dev->dev, 0); |
444 | 446 | ||
445 | clk_disable(rtc_clk); | 447 | clk_disable(rtc_clk); |
446 | clk_put(rtc_clk); | 448 | clk_put(rtc_clk); |