diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-11-24 08:32:11 -1000 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-11-24 08:32:11 -1000 |
commit | 194d9831f0419b5125dc94ec0ece4434d8ef74f0 (patch) | |
tree | ea50492504dbb9965ba6a0abf8f270febdb6e669 | |
parent | 2654ad44b5f7a5f1b12d722a37d9b9df69d57899 (diff) | |
parent | d846b17475d52f037437d125cd19c28f1d36e4f0 (diff) | |
download | linux-194d9831f0419b5125dc94ec0ece4434d8ef74f0.tar.gz linux-194d9831f0419b5125dc94ec0ece4434d8ef74f0.tar.bz2 linux-194d9831f0419b5125dc94ec0ece4434d8ef74f0.zip |
Merge tag 'sound-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound build error fix from Takashi Iwai:
"Only a single commit for fixing the build error without CONFIG_PM in
hda driver."
* tag 'sound-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ALSA: hda - Fix build without CONFIG_PM
-rw-r--r-- | sound/pci/hda/hda_codec.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index cebe2dfdd984..d010de12335e 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c @@ -95,6 +95,7 @@ int snd_hda_delete_codec_preset(struct hda_codec_preset_list *preset) EXPORT_SYMBOL_HDA(snd_hda_delete_codec_preset); #ifdef CONFIG_PM +#define codec_in_pm(codec) ((codec)->in_pm) static void hda_power_work(struct work_struct *work); static void hda_keep_power_on(struct hda_codec *codec); #define hda_codec_is_power_on(codec) ((codec)->power_on) @@ -104,6 +105,7 @@ static inline void hda_call_pm_notify(struct hda_bus *bus, bool power_up) bus->ops.pm_notify(bus, power_up); } #else +#define codec_in_pm(codec) 0 static inline void hda_keep_power_on(struct hda_codec *codec) {} #define hda_codec_is_power_on(codec) 1 #define hda_call_pm_notify(bus, state) {} @@ -228,7 +230,7 @@ static int codec_exec_verb(struct hda_codec *codec, unsigned int cmd, } mutex_unlock(&bus->cmd_mutex); snd_hda_power_down(codec); - if (!codec->in_pm && res && *res == -1 && bus->rirb_error) { + if (!codec_in_pm(codec) && res && *res == -1 && bus->rirb_error) { if (bus->response_reset) { snd_printd("hda_codec: resetting BUS due to " "fatal communication error\n"); @@ -238,7 +240,7 @@ static int codec_exec_verb(struct hda_codec *codec, unsigned int cmd, goto again; } /* clear reset-flag when the communication gets recovered */ - if (!err || codec->in_pm) + if (!err || codec_in_pm(codec)) bus->response_reset = 0; return err; } |