Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 295250
b: refs/heads/master
c: b24a726
h: refs/heads/master
v: v3
  • Loading branch information
Wolfram Sang authored and Linus Torvalds committed Mar 23, 2012
1 parent 6ce8825 commit 48c0a2b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 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: 32d322bcb0d6886084197247e30aa130956d5978
refs/heads/master: b24a7267709bb0adb694364572478f919e9c7390
11 changes: 5 additions & 6 deletions trunk/drivers/rtc/rtc-ds1307.c
Original file line number Diff line number Diff line change
Expand Up @@ -646,11 +646,6 @@ static int __devinit ds1307_probe(struct i2c_client *client,
case ds_1337:
case ds_1339:
case ds_3231:
/* has IRQ? */
if (ds1307->client->irq > 0 && chip->alarm) {
INIT_WORK(&ds1307->work, ds1307_work);
want_irq = true;
}
/* get registers that the "rtc" read below won't read... */
tmp = ds1307->read_block_data(ds1307->client,
DS1337_REG_CONTROL, 2, buf);
Expand All @@ -668,10 +663,14 @@ static int __devinit ds1307_probe(struct i2c_client *client,
* For some variants, be sure alarms can trigger when we're
* running on Vbackup (BBSQI/BBSQW)
*/
if (want_irq) {
if (ds1307->client->irq > 0 && chip->alarm) {
INIT_WORK(&ds1307->work, ds1307_work);

ds1307->regs[0] |= DS1337_BIT_INTCN
| bbsqi_bitpos[ds1307->type];
ds1307->regs[0] &= ~(DS1337_BIT_A2IE | DS1337_BIT_A1IE);

want_irq = true;
}

i2c_smbus_write_byte_data(client, DS1337_REG_CONTROL,
Expand Down

0 comments on commit 48c0a2b

Please sign in to comment.