diff options
Diffstat (limited to 'sound/soc/codecs/wm8940.c')
-rw-r--r-- | sound/soc/codecs/wm8940.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sound/soc/codecs/wm8940.c b/sound/soc/codecs/wm8940.c index b8e17d6bc1f7..b69210a77423 100644 --- a/sound/soc/codecs/wm8940.c +++ b/sound/soc/codecs/wm8940.c | |||
@@ -916,6 +916,21 @@ static int __devexit wm8940_i2c_remove(struct i2c_client *client) | |||
916 | return 0; | 916 | return 0; |
917 | } | 917 | } |
918 | 918 | ||
919 | #ifdef CONFIG_PM | ||
920 | static int wm8940_i2c_suspend(struct i2c_client *client, pm_message_t msg) | ||
921 | { | ||
922 | return snd_soc_suspend_device(&client->dev); | ||
923 | } | ||
924 | |||
925 | static int wm8940_i2c_resume(struct i2c_client *client) | ||
926 | { | ||
927 | return snd_soc_resume_device(&client->dev); | ||
928 | } | ||
929 | #else | ||
930 | #define wm8940_i2c_suspend NULL | ||
931 | #define wm8940_i2c_resume NULL | ||
932 | #endif | ||
933 | |||
919 | static const struct i2c_device_id wm8940_i2c_id[] = { | 934 | static const struct i2c_device_id wm8940_i2c_id[] = { |
920 | { "wm8940", 0 }, | 935 | { "wm8940", 0 }, |
921 | { } | 936 | { } |
@@ -929,6 +944,8 @@ static struct i2c_driver wm8940_i2c_driver = { | |||
929 | }, | 944 | }, |
930 | .probe = wm8940_i2c_probe, | 945 | .probe = wm8940_i2c_probe, |
931 | .remove = __devexit_p(wm8940_i2c_remove), | 946 | .remove = __devexit_p(wm8940_i2c_remove), |
947 | .suspend = wm8940_i2c_suspend, | ||
948 | .resume = wm8940_i2c_resume, | ||
932 | .id_table = wm8940_i2c_id, | 949 | .id_table = wm8940_i2c_id, |
933 | }; | 950 | }; |
934 | 951 | ||