aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/pcf50633-core.c
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2009-10-13 18:12:31 -0400
committerSamuel Ortiz <sameo@linux.intel.com>2009-12-13 13:21:12 -0500
commit25993e4e42c30063e3ea6ec89cfa901b3f34732b (patch)
tree3edf5ed45b288fad93a47b152d2d4c8add8e4417 /drivers/mfd/pcf50633-core.c
parent06b1cc9c05aeb5c5400dbc3b139605334719a881 (diff)
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: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Paul Fertser <fercerpav@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/pcf50633-core.c')
-rw-r--r--drivers/mfd/pcf50633-core.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/mfd/pcf50633-core.c b/drivers/mfd/pcf50633-core.c
index 6efe5c3c22b2..a844445e3872 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,
485} 485}
486 486
487#ifdef CONFIG_PM 487#ifdef CONFIG_PM
488static int pcf50633_suspend(struct device *dev, pm_message_t state) 488static int pcf50633_suspend(struct i2c_client *client, pm_message_t state)
489{ 489{
490 struct pcf50633 *pcf; 490 struct pcf50633 *pcf;
491 int ret = 0, i; 491 int ret = 0, i;
492 u8 res[5]; 492 u8 res[5];
493 493
494 pcf = dev_get_drvdata(dev); 494 pcf = i2c_get_clientdata(client);
495 495
496 /* Make sure our interrupt handlers are not called 496 /* Make sure our interrupt handlers are not called
497 * henceforth */ 497 * henceforth */
@@ -526,12 +526,12 @@ out:
526 return ret; 526 return ret;
527} 527}
528 528
529static int pcf50633_resume(struct device *dev) 529static int pcf50633_resume(struct i2c_client *client)
530{ 530{
531 struct pcf50633 *pcf; 531 struct pcf50633 *pcf;
532 int ret; 532 int ret;
533 533
534 pcf = dev_get_drvdata(dev); 534 pcf = i2c_get_clientdata(client);
535 535
536 /* Write the saved mask registers */ 536 /* Write the saved mask registers */
537 ret = pcf50633_write_block(pcf, PCF50633_REG_INT1M, 537 ret = pcf50633_write_block(pcf, PCF50633_REG_INT1M,
@@ -689,12 +689,12 @@ static struct i2c_device_id pcf50633_id_table[] = {
689static struct i2c_driver pcf50633_driver = { 689static struct i2c_driver pcf50633_driver = {
690 .driver = { 690 .driver = {
691 .name = "pcf50633", 691 .name = "pcf50633",
692 .suspend = pcf50633_suspend,
693 .resume = pcf50633_resume,
694 }, 692 },
695 .id_table = pcf50633_id_table, 693 .id_table = pcf50633_id_table,
696 .probe = pcf50633_probe, 694 .probe = pcf50633_probe,
697 .remove = __devexit_p(pcf50633_remove), 695 .remove = __devexit_p(pcf50633_remove),
696 .suspend = pcf50633_suspend,
697 .resume = pcf50633_resume,
698}; 698};
699 699
700static int __init pcf50633_init(void) 700static int __init pcf50633_init(void)