diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2009-10-07 00:33:13 +0400 |
---|---|---|
committer | Paul Fertser <fercerpav@gmail.com> | 2009-10-07 23:30:21 +0400 |
commit | 804ed578713f259c23e6e98e4740588f4aa00519 (patch) | |
tree | 01c42184211d111fd59a3653162bf2f11df91eb0 /drivers | |
parent | cc1dc4e3c1a9668202bf5e817dd7bd89e3f3cb69 (diff) |
mfd: pcf50633: make suspend/resume belong to i2c_driver
When not using the i2c suspend/resume callbacks the i2c client resumed
before the i2c master.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mfd/pcf50633-core.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/mfd/pcf50633-core.c b/drivers/mfd/pcf50633-core.c index c9e9b5652a8..ace1abaeb75 100644 --- a/drivers/mfd/pcf50633-core.c +++ b/drivers/mfd/pcf50633-core.c @@ -485,13 +485,13 @@ pcf50633_client_dev_register(struct pcf50633 *pcf, const char *name, } #ifdef CONFIG_PM -static int pcf50633_suspend(struct device *dev, pm_message_t state) +static int pcf50633_suspend(struct i2c_client *client, pm_message_t state) { struct pcf50633 *pcf; int ret = 0, i; u8 res[5]; - pcf = dev_get_drvdata(dev); + pcf = i2c_get_clientdata(client); /* Make sure our interrupt handlers are not called * henceforth */ @@ -526,12 +526,12 @@ out: return ret; } -static int pcf50633_resume(struct device *dev) +static int pcf50633_resume(struct i2c_client *client) { struct pcf50633 *pcf; int ret; - pcf = dev_get_drvdata(dev); + pcf = i2c_get_clientdata(client); /* Write the saved mask registers */ ret = pcf50633_write_block(pcf, PCF50633_REG_INT1M, @@ -690,12 +690,12 @@ static struct i2c_device_id pcf50633_id_table[] = { static struct i2c_driver pcf50633_driver = { .driver = { .name = "pcf50633", - .suspend = pcf50633_suspend, - .resume = pcf50633_resume, }, .id_table = pcf50633_id_table, .probe = pcf50633_probe, .remove = __devexit_p(pcf50633_remove), + .suspend = pcf50633_suspend, + .resume = pcf50633_resume, }; static int __init pcf50633_init(void) |