Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 272461
b: refs/heads/master
c: 46f344e
h: refs/heads/master
i:
  272459: f546b33
v: v3
  • Loading branch information
Manuel Lauss authored and Ben Dooks committed Oct 29, 2011
1 parent bab56d3 commit a5310fa
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 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: 84785f120f4d64c5fa8cf4bab1cf07c2507d434f
refs/heads/master: 46f344e2a0844d9b068bffa38cb48b52f4bd2d4a
24 changes: 14 additions & 10 deletions trunk/drivers/i2c/busses/i2c-au1550.c
Original file line number Diff line number Diff line change
Expand Up @@ -387,39 +387,43 @@ static int __devexit i2c_au1550_remove(struct platform_device *pdev)
}

#ifdef CONFIG_PM
static int
i2c_au1550_suspend(struct platform_device *pdev, pm_message_t state)
static int i2c_au1550_suspend(struct device *dev)
{
struct i2c_au1550_data *priv = platform_get_drvdata(pdev);
struct i2c_au1550_data *priv = dev_get_drvdata(dev);

i2c_au1550_disable(priv);

return 0;
}

static int
i2c_au1550_resume(struct platform_device *pdev)
static int i2c_au1550_resume(struct device *dev)
{
struct i2c_au1550_data *priv = platform_get_drvdata(pdev);
struct i2c_au1550_data *priv = dev_get_drvdata(dev);

i2c_au1550_setup(priv);

return 0;
}

static const struct dev_pm_ops i2c_au1550_pmops = {
.suspend = i2c_au1550_suspend,
.resume = i2c_au1550_resume,
};

#define AU1XPSC_SMBUS_PMOPS (&i2c_au1550_pmops)

#else
#define i2c_au1550_suspend NULL
#define i2c_au1550_resume NULL
#define AU1XPSC_SMBUS_PMOPS NULL
#endif

static struct platform_driver au1xpsc_smbus_driver = {
.driver = {
.name = "au1xpsc_smbus",
.owner = THIS_MODULE,
.pm = AU1XPSC_SMBUS_PMOPS,
},
.probe = i2c_au1550_probe,
.remove = __devexit_p(i2c_au1550_remove),
.suspend = i2c_au1550_suspend,
.resume = i2c_au1550_resume,
};

static int __init i2c_au1550_init(void)
Expand Down

0 comments on commit a5310fa

Please sign in to comment.