From: Takashi Iwai Date: Thu, 22 Nov 2012 15:18:13 +0000 (+0100) Subject: ALSA: hda - Don't release firmware when CONFIG_PM is set X-Git-Tag: next-20121205~74^2~38 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=e39ae8564410b8ad9057130ba71eeb6b1ef71d82;p=karo-tx-linux.git ALSA: hda - Don't release firmware when CONFIG_PM is set The new firmware code tries to re-read the formerly read firmware files before suspend. Thus it's wiser to keep the "patch" firmware in the driver for avoiding this unnecessary re-reading. Of course, this will consume a bit of memory for unused stuff, but the patch fw is supposed to be fairly small, so it's more benefit in the end. Signed-off-by: Takashi Iwai --- diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 83be8550707a..4bb52da3ace9 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -3507,8 +3507,10 @@ static int DELAYED_INIT_MARK azx_probe_continue(struct azx *chip) chip->fw->data); if (err < 0) goto out_free; +#ifndef CONFIG_PM release_firmware(chip->fw); /* no longer needed */ chip->fw = NULL; +#endif } #endif if ((probe_only[dev] & 1) == 0) {