diff options
Diffstat (limited to 'sound/soc/codecs/wm9081.c')
-rw-r--r-- | sound/soc/codecs/wm9081.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sound/soc/codecs/wm9081.c b/sound/soc/codecs/wm9081.c index 86fc57e25f97..dbe20597d872 100644 --- a/sound/soc/codecs/wm9081.c +++ b/sound/soc/codecs/wm9081.c | |||
@@ -1492,6 +1492,21 @@ static __devexit int wm9081_i2c_remove(struct i2c_client *client) | |||
1492 | return 0; | 1492 | return 0; |
1493 | } | 1493 | } |
1494 | 1494 | ||
1495 | #ifdef CONFIG_PM | ||
1496 | static int wm9081_i2c_suspend(struct i2c_client *client, pm_message_t msg) | ||
1497 | { | ||
1498 | return snd_soc_suspend_device(&client->dev); | ||
1499 | } | ||
1500 | |||
1501 | static int wm9081_i2c_resume(struct i2c_client *client) | ||
1502 | { | ||
1503 | return snd_soc_resume_device(&client->dev); | ||
1504 | } | ||
1505 | #else | ||
1506 | #define wm9081_i2c_suspend NULL | ||
1507 | #define wm9081_i2c_resume NULL | ||
1508 | #endif | ||
1509 | |||
1495 | static const struct i2c_device_id wm9081_i2c_id[] = { | 1510 | static const struct i2c_device_id wm9081_i2c_id[] = { |
1496 | { "wm9081", 0 }, | 1511 | { "wm9081", 0 }, |
1497 | { } | 1512 | { } |
@@ -1505,6 +1520,8 @@ static struct i2c_driver wm9081_i2c_driver = { | |||
1505 | }, | 1520 | }, |
1506 | .probe = wm9081_i2c_probe, | 1521 | .probe = wm9081_i2c_probe, |
1507 | .remove = __devexit_p(wm9081_i2c_remove), | 1522 | .remove = __devexit_p(wm9081_i2c_remove), |
1523 | .suspend = wm9081_i2c_suspend, | ||
1524 | .resume = wm9081_i2c_resume, | ||
1508 | .id_table = wm9081_i2c_id, | 1525 | .id_table = wm9081_i2c_id, |
1509 | }; | 1526 | }; |
1510 | 1527 | ||