diff options
Diffstat (limited to 'sound/i2c/other/ak4114.c')
-rw-r--r-- | sound/i2c/other/ak4114.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sound/i2c/other/ak4114.c b/sound/i2c/other/ak4114.c index f6ee1e7a9bbd..ee639f57b664 100644 --- a/sound/i2c/other/ak4114.c +++ b/sound/i2c/other/ak4114.c | |||
@@ -621,3 +621,19 @@ static void ak4114_stats(struct work_struct *work) | |||
621 | if (atomic_dec_and_test(&chip->wq_processing)) | 621 | if (atomic_dec_and_test(&chip->wq_processing)) |
622 | schedule_delayed_work(&chip->work, HZ / 10); | 622 | schedule_delayed_work(&chip->work, HZ / 10); |
623 | } | 623 | } |
624 | |||
625 | #ifdef CONFIG_PM | ||
626 | void snd_ak4114_suspend(struct ak4114 *chip) | ||
627 | { | ||
628 | atomic_inc(&chip->wq_processing); /* don't schedule new work */ | ||
629 | cancel_delayed_work_sync(&chip->work); | ||
630 | } | ||
631 | EXPORT_SYMBOL(snd_ak4114_suspend); | ||
632 | |||
633 | void snd_ak4114_resume(struct ak4114 *chip) | ||
634 | { | ||
635 | atomic_dec(&chip->wq_processing); | ||
636 | snd_ak4114_reinit(chip); | ||
637 | } | ||
638 | EXPORT_SYMBOL(snd_ak4114_resume); | ||
639 | #endif | ||