Sound fix #2 for 3.7-rc7
Only a single commit for fixing the build error without CONFIG_PM in hda driver. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iQIcBAABAgAGBQJQsKlqAAoJEGwxgFQ9KSmkfrkP/2AyNsDhnZ4k8UjS1chXOCvF pq3xXJhCKb4pp2o+sPQfwhsFvpNC8R/E5ngoQ6MZcq5kuKWCsagtPjif6AKuBE9r LW/GJnh+ll4bjhPe0U1PPtzm1lhboy3s8bmDfjoPBpzPNNpb2TuxK0eaWm9adLAa G6oLPURnbajQDhnU+xcsdnx0YdydXthmKkiwDx+nbPT21EgKgsjJwfS9Lo4xeS7z 73Na+OuobpER8OsbAW/TMGgV879/TCL6yQovSqf7NGzjaI+9W4iQNyH3WX3fhFrD MsHTT/ztKwg1JO/jKCkW0ZgrY6GkJmHyqeszP4KMZp56dKVphBv0XKTHzLHp8Rgb QoqdzPglbWFTHxLW3qkoXm9b5/rlRjQcXgPVzz+zysjy+YHkA3lhJh3z/UcFRPe3 Pg0YB3ShK9Pn2yQRlMY8dEEdlachBdqygVw1RxOkCUIS8Erosc7FWk50j00CUwQL GAsM3k48agfe97ZiZnXvh3pouYzbBFa4L5Jx2WEoHNfPMtUqDgXrvi+kkz4KH8eK /KrMhC2QN5ARRFIzd0dTkKuWaxHKLEG16SBWXCzHM17i2+PlMVLpuY9nZurYEp69 cl5hKUR0MVpXKcZyaqcm811X4FJ0fY1YbkHE4cQzARitXDvt+YaGWAvxYZDccNYj zDhUbXj6RV9ugnFAt5Px =9jnO -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
194d9831f0
|
@ -95,6 +95,7 @@ int snd_hda_delete_codec_preset(struct hda_codec_preset_list *preset)
|
||||||
EXPORT_SYMBOL_HDA(snd_hda_delete_codec_preset);
|
EXPORT_SYMBOL_HDA(snd_hda_delete_codec_preset);
|
||||||
|
|
||||||
#ifdef CONFIG_PM
|
#ifdef CONFIG_PM
|
||||||
|
#define codec_in_pm(codec) ((codec)->in_pm)
|
||||||
static void hda_power_work(struct work_struct *work);
|
static void hda_power_work(struct work_struct *work);
|
||||||
static void hda_keep_power_on(struct hda_codec *codec);
|
static void hda_keep_power_on(struct hda_codec *codec);
|
||||||
#define hda_codec_is_power_on(codec) ((codec)->power_on)
|
#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);
|
bus->ops.pm_notify(bus, power_up);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
#define codec_in_pm(codec) 0
|
||||||
static inline void hda_keep_power_on(struct hda_codec *codec) {}
|
static inline void hda_keep_power_on(struct hda_codec *codec) {}
|
||||||
#define hda_codec_is_power_on(codec) 1
|
#define hda_codec_is_power_on(codec) 1
|
||||||
#define hda_call_pm_notify(bus, state) {}
|
#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);
|
mutex_unlock(&bus->cmd_mutex);
|
||||||
snd_hda_power_down(codec);
|
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) {
|
if (bus->response_reset) {
|
||||||
snd_printd("hda_codec: resetting BUS due to "
|
snd_printd("hda_codec: resetting BUS due to "
|
||||||
"fatal communication error\n");
|
"fatal communication error\n");
|
||||||
|
@ -238,7 +240,7 @@ static int codec_exec_verb(struct hda_codec *codec, unsigned int cmd,
|
||||||
goto again;
|
goto again;
|
||||||
}
|
}
|
||||||
/* clear reset-flag when the communication gets recovered */
|
/* clear reset-flag when the communication gets recovered */
|
||||||
if (!err || codec->in_pm)
|
if (!err || codec_in_pm(codec))
|
||||||
bus->response_reset = 0;
|
bus->response_reset = 0;
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue