Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 319161
b: refs/heads/master
c: f277d27
h: refs/heads/master
i:
  319159: ae2e5a7
v: v3
  • Loading branch information
Rafael J. Wysocki authored and Wolfram Sang committed Jul 12, 2012
1 parent d175dbf commit 39ba820
Show file tree
Hide file tree
Showing 2 changed files with 8 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: 02d8bf8dc6b09cb810599c64d47da3bdf4f85882
refs/heads/master: f277d27cc40f77719d45d9f5abf3ae4e9bdb172f
13 changes: 7 additions & 6 deletions trunk/drivers/i2c/busses/i2c-at91.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,30 +279,31 @@ static int __devexit at91_i2c_remove(struct platform_device *pdev)

/* NOTE: could save a few mA by keeping clock off outside of at91_xfer... */

static int at91_i2c_suspend(struct platform_device *pdev, pm_message_t mesg)
static int at91_i2c_suspend(struct device *dev)
{
clk_disable(twi_clk);
return 0;
}

static int at91_i2c_resume(struct platform_device *pdev)
static int at91_i2c_resume(struct device *dev)
{
return clk_enable(twi_clk);
}

static SIMPLE_DEV_PM_OPS(at91_i2c_pm, at91_i2c_suspend, at91_i2c_resume);
#define AT91_I2C_PM (&at91_i2c_pm)

#else
#define at91_i2c_suspend NULL
#define at91_i2c_resume NULL
#define AT91_I2C_PM NULL
#endif

static struct platform_driver at91_i2c_driver = {
.probe = at91_i2c_probe,
.remove = __devexit_p(at91_i2c_remove),
.suspend = at91_i2c_suspend,
.resume = at91_i2c_resume,
.driver = {
.name = "at91_i2c",
.owner = THIS_MODULE,
.pm = AT91_I2C_PM,
},
};

Expand Down

0 comments on commit 39ba820

Please sign in to comment.