Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 114805
b: refs/heads/master
c: 986e36a
h: refs/heads/master
i:
  114803: 9134bc5
v: v3
  • Loading branch information
Marc Pignat authored and Linus Torvalds committed Oct 16, 2008
1 parent 2d4a46a commit 693c5b8
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5d5b4d74f9ae85bbd558a708678b6927f962e75d
refs/heads/master: 986e36a5b817de01733d46aa623406106d661cec
21 changes: 21 additions & 0 deletions trunk/drivers/rtc/rtc-ds1374.c
Original file line number Diff line number Diff line change
Expand Up @@ -429,12 +429,33 @@ static int __devexit ds1374_remove(struct i2c_client *client)
return 0;
}

#ifdef CONFIG_PM
static int ds1374_suspend(struct i2c_client *client, pm_message_t state)
{
if (client->irq >= 0 && device_may_wakeup(&client->dev))
enable_irq_wake(client->irq);
return 0;
}

static int ds1374_resume(struct i2c_client *client)
{
if (client->irq >= 0 && device_may_wakeup(&client->dev))
disable_irq_wake(client->irq);
return 0;
}
#else
#define ds1374_suspend NULL
#define ds1374_resume NULL
#endif

static struct i2c_driver ds1374_driver = {
.driver = {
.name = "rtc-ds1374",
.owner = THIS_MODULE,
},
.probe = ds1374_probe,
.suspend = ds1374_suspend,
.resume = ds1374_resume,
.remove = __devexit_p(ds1374_remove),
.id_table = ds1374_id,
};
Expand Down

0 comments on commit 693c5b8

Please sign in to comment.