Skip to content

Commit 1f28960

Browse files
sfrothwellJaroslav Kysela
authored andcommitted
[ALSA] Fix tas_suspend/resume build warning
sound/aoa/codecs/snd-aoa-codec-tas.c:750: warning: 'tas_suspend' defined but not used sound/aoa/codecs/snd-aoa-codec-tas.c:760: warning: 'tas_resume' defined but not used Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
1 parent 65a6ec0 commit 1f28960

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

‎sound/aoa/codecs/snd-aoa-codec-tas.c‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -743,6 +743,7 @@ static int tas_switch_clock(struct codec_info_item *cii, enum clock_switch clock
743743
return 0;
744744
}
745745

746+
#ifdef CONFIG_PM
746747
/* we are controlled via i2c and assume that is always up
747748
* If that wasn't the case, we'd have to suspend once
748749
* our i2c device is suspended, and then take note of that! */
@@ -768,7 +769,6 @@ static int tas_resume(struct tas *tas)
768769
return 0;
769770
}
770771

771-
#ifdef CONFIG_PM
772772
static int _tas_suspend(struct codec_info_item *cii, pm_message_t state)
773773
{
774774
return tas_suspend(cii->codec_data);
@@ -778,7 +778,10 @@ static int _tas_resume(struct codec_info_item *cii)
778778
{
779779
return tas_resume(cii->codec_data);
780780
}
781-
#endif
781+
#else /* CONFIG_PM */
782+
#define _tas_suspend NULL
783+
#define _tas_resume NULL
784+
#endif /* CONFIG_PM */
782785

783786
static struct codec_info tas_codec_info = {
784787
.transfers = tas_transfers,
@@ -791,10 +794,8 @@ static struct codec_info tas_codec_info = {
791794
.owner = THIS_MODULE,
792795
.usable = tas_usable,
793796
.switch_clock = tas_switch_clock,
794-
#ifdef CONFIG_PM
795797
.suspend = _tas_suspend,
796798
.resume = _tas_resume,
797-
#endif
798799
};
799800

800801
static int tas_init_codec(struct aoa_codec *codec)

0 commit comments

Comments
 (0)