Loading sound/pci/hda/hda_i915.c +14 −4 Original line number Diff line number Diff line Loading @@ -42,10 +42,15 @@ int hda_display_power(struct hda_intel *hda, bool enable) dev_dbg(&hda->chip.pci->dev, "display power %s\n", enable ? "enable" : "disable"); if (enable) if (enable) { if (!hda->i915_power_refcount++) acomp->ops->get_power(acomp->dev); else } else { WARN_ON(!hda->i915_power_refcount); if (!--hda->i915_power_refcount) acomp->ops->put_power(acomp->dev); } return 0; } Loading Loading @@ -183,6 +188,11 @@ int hda_i915_init(struct hda_intel *hda) int hda_i915_exit(struct hda_intel *hda) { struct device *dev = &hda->chip.pci->dev; struct i915_audio_component *acomp = &hda->audio_component; WARN_ON(hda->i915_power_refcount); if (hda->i915_power_refcount > 0 && acomp->ops) acomp->ops->put_power(acomp->dev); component_master_del(dev, &hda_component_master_ops); Loading sound/pci/hda/hda_intel.h +1 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ struct hda_intel { /* i915 component interface */ struct i915_audio_component audio_component; int i915_power_refcount; }; #ifdef CONFIG_SND_HDA_I915 Loading Loading
sound/pci/hda/hda_i915.c +14 −4 Original line number Diff line number Diff line Loading @@ -42,10 +42,15 @@ int hda_display_power(struct hda_intel *hda, bool enable) dev_dbg(&hda->chip.pci->dev, "display power %s\n", enable ? "enable" : "disable"); if (enable) if (enable) { if (!hda->i915_power_refcount++) acomp->ops->get_power(acomp->dev); else } else { WARN_ON(!hda->i915_power_refcount); if (!--hda->i915_power_refcount) acomp->ops->put_power(acomp->dev); } return 0; } Loading Loading @@ -183,6 +188,11 @@ int hda_i915_init(struct hda_intel *hda) int hda_i915_exit(struct hda_intel *hda) { struct device *dev = &hda->chip.pci->dev; struct i915_audio_component *acomp = &hda->audio_component; WARN_ON(hda->i915_power_refcount); if (hda->i915_power_refcount > 0 && acomp->ops) acomp->ops->put_power(acomp->dev); component_master_del(dev, &hda_component_master_ops); Loading
sound/pci/hda/hda_intel.h +1 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ struct hda_intel { /* i915 component interface */ struct i915_audio_component audio_component; int i915_power_refcount; }; #ifdef CONFIG_SND_HDA_I915 Loading