From 3daf677d5e8e4d6a89845952e0a503c4bd57e456 Mon Sep 17 00:00:00 2001 From: Paul Fertser Date: Sat, 17 Oct 2009 04:35:03 +0400 Subject: make suspend/resume belong to i2c_driver Ported from 804ed578713f259c23e6e98e4740588f4aa00519 --- drivers/mfd/pcf50606-core.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'drivers/mfd') diff --git a/drivers/mfd/pcf50606-core.c b/drivers/mfd/pcf50606-core.c index 09ce70b9b79..355a7fc7476 100644 --- a/drivers/mfd/pcf50606-core.c +++ b/drivers/mfd/pcf50606-core.c @@ -459,13 +459,13 @@ pcf50606_client_dev_register(struct pcf50606 *pcf, const char *name, } #ifdef CONFIG_PM -static int pcf50606_suspend(struct device *dev, pm_message_t state) +static int pcf50606_suspend(struct i2c_client *client, pm_message_t state) { struct pcf50606 *pcf; int ret, i; u8 res[3]; - pcf = dev_get_drvdata(dev); + pcf = i2c_get_clientdata(client); /* Make sure our interrupt handlers are not called * henceforth */ @@ -500,12 +500,12 @@ out: return ret; } -static int pcf50606_resume(struct device *dev) +static int pcf50606_resume(struct i2c_client *client) { struct pcf50606 *pcf; int ret; - pcf = dev_get_drvdata(dev); + pcf = i2c_get_clientdata(client); /* Write the saved mask registers */ ret = pcf50606_write_block(pcf, PCF50606_REG_INT1M, @@ -654,12 +654,12 @@ static struct i2c_device_id pcf50606_id_table[] = { static struct i2c_driver pcf50606_driver = { .driver = { .name = "pcf50606", - .suspend = pcf50606_suspend, - .resume = pcf50606_resume, }, .id_table = pcf50606_id_table, .probe = pcf50606_probe, .remove = pcf50606_remove, + .suspend = pcf50606_suspend, + .resume = pcf50606_resume, }; static int __init pcf50606_init(void) -- cgit v1.2.3