diff options
author | Takashi Iwai <tiwai@suse.de> | 2015-03-03 17:22:12 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-03-23 13:17:48 +0100 |
commit | c4c2533f802d6877803c4d778def43d8a122f27b (patch) | |
tree | ba9b5505cc9da460dd278f7eaf6c55e7211a7f03 /sound/hda | |
parent | 05852448690d7d810175f8ceccefba083525aa89 (diff) | |
download | op-kernel-dev-c4c2533f802d6877803c4d778def43d8a122f27b.zip op-kernel-dev-c4c2533f802d6877803c4d778def43d8a122f27b.tar.gz |
ALSA: hda - Fix possible runtime PM refcount unbalance
When the driver is unloaded before the codec is bound, it still keeps
the runtime PM refcount up, and results in the unbalance. This patch
covers these cases by introducing a flag indicating the runtime PM
initialization and handling the codec registration procedure more
properly. It also fixes the missing input beep device as a gratis,
too.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/hda')
-rw-r--r-- | sound/hda/hdac_device.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/hda/hdac_device.c b/sound/hda/hdac_device.c index aaece36..6e8ee1d 100644 --- a/sound/hda/hdac_device.c +++ b/sound/hda/hdac_device.c @@ -109,7 +109,6 @@ int snd_hdac_device_init(struct hdac_device *codec, struct hdac_bus *bus, return 0; error: - pm_runtime_put_noidle(&codec->dev); put_device(&codec->dev); return err; } @@ -121,7 +120,7 @@ EXPORT_SYMBOL_GPL(snd_hdac_device_init); */ void snd_hdac_device_exit(struct hdac_device *codec) { - /* pm_runtime_put_noidle(&codec->dev); */ + pm_runtime_put_noidle(&codec->dev); snd_hdac_bus_remove_device(codec->bus, codec); kfree(codec->vendor_name); kfree(codec->chip_name); |