Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 319163
b: refs/heads/master
c: 84603c7
h: refs/heads/master
i:
  319161: 39ba820
  319159: ae2e5a7
v: v3
  • Loading branch information
Rafael J. Wysocki authored and Wolfram Sang committed Jul 12, 2012
1 parent 183b5b0 commit f7aa1ac
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 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: 85777ad264695b6287b958627196bd70f72ca8ae
refs/heads/master: 84603c7c2e94bd1394f29fbfbd289432565ee2e8
17 changes: 9 additions & 8 deletions trunk/drivers/i2c/busses/i2c-ocores.c
Original file line number Diff line number Diff line change
Expand Up @@ -367,9 +367,9 @@ static int __devexit ocores_i2c_remove(struct platform_device* pdev)
}

#ifdef CONFIG_PM
static int ocores_i2c_suspend(struct platform_device *pdev, pm_message_t state)
static int ocores_i2c_suspend(struct device *dev)
{
struct ocores_i2c *i2c = platform_get_drvdata(pdev);
struct ocores_i2c *i2c = dev_get_drvdata(dev);
u8 ctrl = oc_getreg(i2c, OCI2C_CONTROL);

/* make sure the device is disabled */
Expand All @@ -378,17 +378,19 @@ static int ocores_i2c_suspend(struct platform_device *pdev, pm_message_t state)
return 0;
}

static int ocores_i2c_resume(struct platform_device *pdev)
static int ocores_i2c_resume(struct device *dev)
{
struct ocores_i2c *i2c = platform_get_drvdata(pdev);
struct ocores_i2c *i2c = dev_get_drvdata(dev);

ocores_init(i2c);

return 0;
}

static SIMPLE_DEV_PM_OPS(ocores_i2c_pm, ocores_i2c_suspend, ocores_i2c_resume);
#define OCORES_I2C_PM (&ocores_i2c_pm)
#else
#define ocores_i2c_suspend NULL
#define ocores_i2c_resume NULL
#define OCORES_I2C_PM NULL
#endif

static struct of_device_id ocores_i2c_match[] = {
Expand All @@ -400,12 +402,11 @@ MODULE_DEVICE_TABLE(of, ocores_i2c_match);
static struct platform_driver ocores_i2c_driver = {
.probe = ocores_i2c_probe,
.remove = __devexit_p(ocores_i2c_remove),
.suspend = ocores_i2c_suspend,
.resume = ocores_i2c_resume,
.driver = {
.owner = THIS_MODULE,
.name = "ocores-i2c",
.of_match_table = ocores_i2c_match,
.pm = OCORES_I2C_PM,
},
};

Expand Down

0 comments on commit f7aa1ac

Please sign in to comment.