Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 233915
b: refs/heads/master
c: 2ec38a0
h: refs/heads/master
i:
  233913: 2c5d8ef
  233911: 613ac47
v: v3
  • Loading branch information
Axel Lin authored and Linus Torvalds committed Mar 5, 2011
1 parent 5069c36 commit fb88470
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 212e3499b2c69cc0899422973310e610d1c0666f
refs/heads/master: 2ec38a0359e227c01080dcd670a0368c61ccd9ce
12 changes: 7 additions & 5 deletions trunk/drivers/rtc/rtc-s3c.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,18 +77,20 @@ static irqreturn_t s3c_rtc_tickirq(int irq, void *id)
}

/* Update control registers */
static void s3c_rtc_setaie(int to)
static int s3c_rtc_setaie(struct device *dev, unsigned int enabled)
{
unsigned int tmp;

pr_debug("%s: aie=%d\n", __func__, to);
pr_debug("%s: aie=%d\n", __func__, enabled);

tmp = readb(s3c_rtc_base + S3C2410_RTCALM) & ~S3C2410_RTCALM_ALMEN;

if (to)
if (enabled)
tmp |= S3C2410_RTCALM_ALMEN;

writeb(tmp, s3c_rtc_base + S3C2410_RTCALM);

return 0;
}

static int s3c_rtc_setpie(struct device *dev, int enabled)
Expand Down Expand Up @@ -308,7 +310,7 @@ static int s3c_rtc_setalarm(struct device *dev, struct rtc_wkalrm *alrm)

writeb(alrm_en, base + S3C2410_RTCALM);

s3c_rtc_setaie(alrm->enabled);
s3c_rtc_setaie(dev, alrm->enabled);

return 0;
}
Expand Down Expand Up @@ -440,7 +442,7 @@ static int __devexit s3c_rtc_remove(struct platform_device *dev)
rtc_device_unregister(rtc);

s3c_rtc_setpie(&dev->dev, 0);
s3c_rtc_setaie(0);
s3c_rtc_setaie(&dev->dev, 0);

clk_disable(rtc_clk);
clk_put(rtc_clk);
Expand Down

0 comments on commit fb88470

Please sign in to comment.