aboutsummaryrefslogtreecommitdiffstats
path: root/sound/hda/hdac_component.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2019-04-17 11:26:25 -0700
committerDavid S. Miller <davem@davemloft.net>2019-04-17 11:26:25 -0700
commit6b0a7f84ea1fe248df96ccc4dd86e817e32ef65b (patch)
tree0a7976054052e793da782c2b7ec34eccfbf66449 /sound/hda/hdac_component.c
parentMerge branch 's390-next' (diff)
parentMerge tag 'for-linus-5.1-2' of git://github.com/cminyard/linux-ipmi (diff)
downloadlinux-dev-6b0a7f84ea1fe248df96ccc4dd86e817e32ef65b.tar.xz
linux-dev-6b0a7f84ea1fe248df96ccc4dd86e817e32ef65b.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflict resolution of af_smc.c from Stephen Rothwell. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'sound/hda/hdac_component.c')
-rw-r--r--sound/hda/hdac_component.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sound/hda/hdac_component.c b/sound/hda/hdac_component.c
index 5c95933e739a..1ea51e3b942a 100644
--- a/sound/hda/hdac_component.c
+++ b/sound/hda/hdac_component.c
@@ -69,13 +69,15 @@ void snd_hdac_display_power(struct hdac_bus *bus, unsigned int idx, bool enable)
dev_dbg(bus->dev, "display power %s\n",
enable ? "enable" : "disable");
+
+ mutex_lock(&bus->lock);
if (enable)
set_bit(idx, &bus->display_power_status);
else
clear_bit(idx, &bus->display_power_status);
if (!acomp || !acomp->ops)
- return;
+ goto unlock;
if (bus->display_power_status) {
if (!bus->display_power_active) {
@@ -92,6 +94,8 @@ void snd_hdac_display_power(struct hdac_bus *bus, unsigned int idx, bool enable)
bus->display_power_active = false;
}
}
+ unlock:
+ mutex_unlock(&bus->lock);
}
EXPORT_SYMBOL_GPL(snd_hdac_display_power);