aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
Diffstat (limited to 'sound')
-rw-r--r--sound/aoa/codecs/snd-aoa-codec-tas.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sound/aoa/codecs/snd-aoa-codec-tas.c b/sound/aoa/codecs/snd-aoa-codec-tas.c
index 2f771f57c76f..3cbfe4619aa8 100644
--- a/sound/aoa/codecs/snd-aoa-codec-tas.c
+++ b/sound/aoa/codecs/snd-aoa-codec-tas.c
@@ -743,6 +743,7 @@ static int tas_switch_clock(struct codec_info_item *cii, enum clock_switch clock
743 return 0; 743 return 0;
744} 744}
745 745
746#ifdef CONFIG_PM
746/* we are controlled via i2c and assume that is always up 747/* we are controlled via i2c and assume that is always up
747 * If that wasn't the case, we'd have to suspend once 748 * If that wasn't the case, we'd have to suspend once
748 * our i2c device is suspended, and then take note of that! */ 749 * our i2c device is suspended, and then take note of that! */
@@ -768,7 +769,6 @@ static int tas_resume(struct tas *tas)
768 return 0; 769 return 0;
769} 770}
770 771
771#ifdef CONFIG_PM
772static int _tas_suspend(struct codec_info_item *cii, pm_message_t state) 772static int _tas_suspend(struct codec_info_item *cii, pm_message_t state)
773{ 773{
774 return tas_suspend(cii->codec_data); 774 return tas_suspend(cii->codec_data);
@@ -778,7 +778,10 @@ static int _tas_resume(struct codec_info_item *cii)
778{ 778{
779 return tas_resume(cii->codec_data); 779 return tas_resume(cii->codec_data);
780} 780}
781#endif 781#else /* CONFIG_PM */
782#define _tas_suspend NULL
783#define _tas_resume NULL
784#endif /* CONFIG_PM */
782 785
783static struct codec_info tas_codec_info = { 786static struct codec_info tas_codec_info = {
784 .transfers = tas_transfers, 787 .transfers = tas_transfers,
@@ -791,10 +794,8 @@ static struct codec_info tas_codec_info = {
791 .owner = THIS_MODULE, 794 .owner = THIS_MODULE,
792 .usable = tas_usable, 795 .usable = tas_usable,
793 .switch_clock = tas_switch_clock, 796 .switch_clock = tas_switch_clock,
794#ifdef CONFIG_PM
795 .suspend = _tas_suspend, 797 .suspend = _tas_suspend,
796 .resume = _tas_resume, 798 .resume = _tas_resume,
797#endif
798}; 799};
799 800
800static int tas_init_codec(struct aoa_codec *codec) 801static int tas_init_codec(struct aoa_codec *codec)