Skip to content

Commit

Permalink
drivers/rtc/rtc-isl1208.c: call rtc_update_irq() from the alarm irq h…
Browse files Browse the repository at this point in the history
…andler

Previously the alarm event was not propagated into the RTC subsystem.
By adding a call to rtc_update_irq, this fixes a timeout problem with
the hwclock utility.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Jan Luebbe authored and Linus Torvalds committed Feb 5, 2013
1 parent 275aaa6 commit 72fca4a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/rtc/rtc-isl1208.c
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,7 @@ isl1208_rtc_interrupt(int irq, void *data)
{
unsigned long timeout = jiffies + msecs_to_jiffies(1000);
struct i2c_client *client = data;
struct rtc_device *rtc = i2c_get_clientdata(client);
int handled = 0, sr, err;

/*
Expand All @@ -528,6 +529,8 @@ isl1208_rtc_interrupt(int irq, void *data)
if (sr & ISL1208_REG_SR_ALM) {
dev_dbg(&client->dev, "alarm!\n");

rtc_update_irq(rtc, 1, RTC_IRQF | RTC_AF);

/* Clear the alarm */
sr &= ~ISL1208_REG_SR_ALM;
sr = i2c_smbus_write_byte_data(client, ISL1208_REG_SR, sr);
Expand Down

0 comments on commit 72fca4a

Please sign in to comment.