Commit 25993e4e authored by Lars-Peter Clausen's avatar Lars-Peter Clausen Committed by Samuel Ortiz

mfd: Make pcf50633 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: default avatarLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: default avatarPaul Fertser <fercerpav@gmail.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent 06b1cc9c
...@@ -485,13 +485,13 @@ pcf50633_client_dev_register(struct pcf50633 *pcf, const char *name, ...@@ -485,13 +485,13 @@ pcf50633_client_dev_register(struct pcf50633 *pcf, const char *name,
} }
#ifdef CONFIG_PM #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; struct pcf50633 *pcf;
int ret = 0, i; int ret = 0, i;
u8 res[5]; u8 res[5];
pcf = dev_get_drvdata(dev); pcf = i2c_get_clientdata(client);
/* Make sure our interrupt handlers are not called /* Make sure our interrupt handlers are not called
* henceforth */ * henceforth */
...@@ -526,12 +526,12 @@ out: ...@@ -526,12 +526,12 @@ out:
return ret; return ret;
} }
static int pcf50633_resume(struct device *dev) static int pcf50633_resume(struct i2c_client *client)
{ {
struct pcf50633 *pcf; struct pcf50633 *pcf;
int ret; int ret;
pcf = dev_get_drvdata(dev); pcf = i2c_get_clientdata(client);
/* Write the saved mask registers */ /* Write the saved mask registers */
ret = pcf50633_write_block(pcf, PCF50633_REG_INT1M, ret = pcf50633_write_block(pcf, PCF50633_REG_INT1M,
...@@ -689,12 +689,12 @@ static struct i2c_device_id pcf50633_id_table[] = { ...@@ -689,12 +689,12 @@ static struct i2c_device_id pcf50633_id_table[] = {
static struct i2c_driver pcf50633_driver = { static struct i2c_driver pcf50633_driver = {
.driver = { .driver = {
.name = "pcf50633", .name = "pcf50633",
.suspend = pcf50633_suspend,
.resume = pcf50633_resume,
}, },
.id_table = pcf50633_id_table, .id_table = pcf50633_id_table,
.probe = pcf50633_probe, .probe = pcf50633_probe,
.remove = __devexit_p(pcf50633_remove), .remove = __devexit_p(pcf50633_remove),
.suspend = pcf50633_suspend,
.resume = pcf50633_resume,
}; };
static int __init pcf50633_init(void) static int __init pcf50633_init(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment