Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 319164
b: refs/heads/master
c: 783414b
h: refs/heads/master
v: v3
  • Loading branch information
Rafael J. Wysocki authored and Wolfram Sang committed Jul 12, 2012
1 parent f7aa1ac commit c744d3e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 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: 84603c7c2e94bd1394f29fbfbd289432565ee2e8
refs/heads/master: 783414ba9a65fa15e44716dc478e9536d202e0ff
19 changes: 10 additions & 9 deletions trunk/drivers/i2c/busses/i2c-pnx.c
Original file line number Diff line number Diff line change
Expand Up @@ -587,25 +587,27 @@ static struct i2c_algorithm pnx_algorithm = {
};

#ifdef CONFIG_PM
static int i2c_pnx_controller_suspend(struct platform_device *pdev,
pm_message_t state)
static int i2c_pnx_controller_suspend(struct device *dev)
{
struct i2c_pnx_algo_data *alg_data = platform_get_drvdata(pdev);
struct i2c_pnx_algo_data *alg_data = dev_get_drvdata(dev);

clk_disable(alg_data->clk);

return 0;
}

static int i2c_pnx_controller_resume(struct platform_device *pdev)
static int i2c_pnx_controller_resume(struct device *dev)
{
struct i2c_pnx_algo_data *alg_data = platform_get_drvdata(pdev);
struct i2c_pnx_algo_data *alg_data = dev_get_drvdata(dev);

return clk_enable(alg_data->clk);
}

static SIMPLE_DEV_PM_OPS(i2c_pnx_pm,
i2c_pnx_controller_suspend, i2c_pnx_controller_resume);
#define PNX_I2C_PM (&i2c_pnx_pm)
#else
#define i2c_pnx_controller_suspend NULL
#define i2c_pnx_controller_resume NULL
#define PNX_I2C_PM NULL
#endif

static int __devinit i2c_pnx_probe(struct platform_device *pdev)
Expand Down Expand Up @@ -783,11 +785,10 @@ static struct platform_driver i2c_pnx_driver = {
.name = "pnx-i2c",
.owner = THIS_MODULE,
.of_match_table = of_match_ptr(i2c_pnx_of_match),
.pm = PNX_I2C_PM,
},
.probe = i2c_pnx_probe,
.remove = __devexit_p(i2c_pnx_remove),
.suspend = i2c_pnx_controller_suspend,
.resume = i2c_pnx_controller_resume,
};

static int __init i2c_adap_pnx_init(void)
Expand Down

0 comments on commit c744d3e

Please sign in to comment.