diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-05-07 05:03:18 -0400 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2012-05-07 05:32:07 -0400 |
commit | b6c9eeef4e775e1fff76f4395d11638dc198271d (patch) | |
tree | 617b0aa20f559c190ec821d762e59b4bed9e0424 /drivers/mfd/tps65090.c | |
parent | 1ca5513af77307eccea7efd4d12ef5c14f1b12ab (diff) |
mfd: Don't use I2C-specific suspend and resume operations for tps65090
The legacy suspend operations have been deprecated and printing warnings
on boot for over a year now.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Venu Byravarasu <vbyravarasu@nvidia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/tps65090.c')
-rw-r--r-- | drivers/mfd/tps65090.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/mfd/tps65090.c b/drivers/mfd/tps65090.c index ac7e8b1f0034..6dc4c345ea68 100644 --- a/drivers/mfd/tps65090.c +++ b/drivers/mfd/tps65090.c | |||
@@ -335,21 +335,27 @@ static int __devexit tps65090_i2c_remove(struct i2c_client *client) | |||
335 | } | 335 | } |
336 | 336 | ||
337 | #ifdef CONFIG_PM_SLEEP | 337 | #ifdef CONFIG_PM_SLEEP |
338 | static int tps65090_i2c_suspend(struct i2c_client *client, pm_message_t state) | 338 | static int tps65090_suspend(struct device *dev) |
339 | { | 339 | { |
340 | struct i2c_client *client = to_i2c_client(dev); | ||
340 | if (client->irq) | 341 | if (client->irq) |
341 | disable_irq(client->irq); | 342 | disable_irq(client->irq); |
342 | return 0; | 343 | return 0; |
343 | } | 344 | } |
344 | 345 | ||
345 | static int tps65090_i2c_resume(struct i2c_client *client) | 346 | static int tps65090_resume(struct device *dev) |
346 | { | 347 | { |
348 | struct i2c_client *client = to_i2c_client(dev); | ||
347 | if (client->irq) | 349 | if (client->irq) |
348 | enable_irq(client->irq); | 350 | enable_irq(client->irq); |
349 | return 0; | 351 | return 0; |
350 | } | 352 | } |
351 | #endif | 353 | #endif |
352 | 354 | ||
355 | static const struct dev_pm_ops tps65090_pm_ops = { | ||
356 | SET_SYSTEM_SLEEP_PM_OPS(tps65090_suspend, tps65090_resume) | ||
357 | }; | ||
358 | |||
353 | static const struct i2c_device_id tps65090_id_table[] = { | 359 | static const struct i2c_device_id tps65090_id_table[] = { |
354 | { "tps65090", 0 }, | 360 | { "tps65090", 0 }, |
355 | { }, | 361 | { }, |
@@ -360,13 +366,10 @@ static struct i2c_driver tps65090_driver = { | |||
360 | .driver = { | 366 | .driver = { |
361 | .name = "tps65090", | 367 | .name = "tps65090", |
362 | .owner = THIS_MODULE, | 368 | .owner = THIS_MODULE, |
369 | .pm = &tps65090_pm_ops, | ||
363 | }, | 370 | }, |
364 | .probe = tps65090_i2c_probe, | 371 | .probe = tps65090_i2c_probe, |
365 | .remove = __devexit_p(tps65090_i2c_remove), | 372 | .remove = __devexit_p(tps65090_i2c_remove), |
366 | #ifdef CONFIG_PM_SLEEP | ||
367 | .suspend = tps65090_i2c_suspend, | ||
368 | .resume = tps65090_i2c_resume, | ||
369 | #endif | ||
370 | .id_table = tps65090_id_table, | 373 | .id_table = tps65090_id_table, |
371 | }; | 374 | }; |
372 | 375 | ||