Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 107667
b: refs/heads/master
c: 605eb8b
h: refs/heads/master
i:
  107665: 9baf287
  107663: c153cf8
v: v3
  • Loading branch information
Mike Frysinger authored and Linus Torvalds committed Aug 5, 2008
1 parent 301a105 commit 617a5a9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 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: 813006f4bb4a39afdde8ab2e3559971c029d1dc0
refs/heads/master: 605eb8b3c05e970caf71c48f693efe33c212fb7b
20 changes: 9 additions & 11 deletions trunk/drivers/rtc/rtc-bfin.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,12 +238,12 @@ static void bfin_rtc_release(struct device *dev)
free_irq(IRQ_RTC, dev);
}

static void bfin_rtc_int_set(struct bfin_rtc *rtc, u16 rtc_int)
static void bfin_rtc_int_set(u16 rtc_int)
{
bfin_write_RTC_ISTAT(rtc_int);
bfin_write_RTC_ICTL(bfin_read_RTC_ICTL() | rtc_int);
}
static void bfin_rtc_int_clear(struct bfin_rtc *rtc, u16 rtc_int)
static void bfin_rtc_int_clear(u16 rtc_int)
{
bfin_write_RTC_ICTL(bfin_read_RTC_ICTL() & rtc_int);
}
Expand All @@ -252,7 +252,7 @@ static void bfin_rtc_int_set_alarm(struct bfin_rtc *rtc)
/* Blackfin has different bits for whether the alarm is
* more than 24 hours away.
*/
bfin_rtc_int_set(rtc, (rtc->rtc_alarm.tm_yday == -1 ? RTC_ISTAT_ALARM : RTC_ISTAT_ALARM_DAY));
bfin_rtc_int_set(rtc->rtc_alarm.tm_yday == -1 ? RTC_ISTAT_ALARM : RTC_ISTAT_ALARM_DAY);
}
static int bfin_rtc_ioctl(struct device *dev, unsigned int cmd, unsigned long arg)
{
Expand All @@ -266,21 +266,21 @@ static int bfin_rtc_ioctl(struct device *dev, unsigned int cmd, unsigned long ar
switch (cmd) {
case RTC_PIE_ON:
dev_dbg_stamp(dev);
bfin_rtc_int_set(rtc, RTC_ISTAT_STOPWATCH);
bfin_rtc_int_set(RTC_ISTAT_STOPWATCH);
bfin_write_RTC_SWCNT(rtc->rtc_dev->irq_freq);
break;
case RTC_PIE_OFF:
dev_dbg_stamp(dev);
bfin_rtc_int_clear(rtc, ~RTC_ISTAT_STOPWATCH);
bfin_rtc_int_clear(~RTC_ISTAT_STOPWATCH);
break;

case RTC_UIE_ON:
dev_dbg_stamp(dev);
bfin_rtc_int_set(rtc, RTC_ISTAT_SEC);
bfin_rtc_int_set(RTC_ISTAT_SEC);
break;
case RTC_UIE_OFF:
dev_dbg_stamp(dev);
bfin_rtc_int_clear(rtc, ~RTC_ISTAT_SEC);
bfin_rtc_int_clear(~RTC_ISTAT_SEC);
break;

case RTC_AIE_ON:
Expand All @@ -289,7 +289,7 @@ static int bfin_rtc_ioctl(struct device *dev, unsigned int cmd, unsigned long ar
break;
case RTC_AIE_OFF:
dev_dbg_stamp(dev);
bfin_rtc_int_clear(rtc, ~(RTC_ISTAT_ALARM | RTC_ISTAT_ALARM_DAY));
bfin_rtc_int_clear(~(RTC_ISTAT_ALARM | RTC_ISTAT_ALARM_DAY));
break;

default:
Expand Down Expand Up @@ -435,12 +435,10 @@ static int __devexit bfin_rtc_remove(struct platform_device *pdev)
#ifdef CONFIG_PM
static int bfin_rtc_suspend(struct platform_device *pdev, pm_message_t state)
{
struct bfin_rtc *rtc = dev_get_drvdata(&pdev->dev);

if (device_may_wakeup(&pdev->dev))
enable_irq_wake(IRQ_RTC);
else
bfin_rtc_int_clear(rtc, -1);
bfin_rtc_int_clear(-1);

return 0;
}
Expand Down

0 comments on commit 617a5a9

Please sign in to comment.