X-Git-Url: http://git.monstr.eu/?a=blobdiff_plain;f=sound%2Fhda%2Fhdac_component.c;h=1ea51e3b942a034a1b487bb2ad7dc054893a4d39;hb=f6111b9d7970df07f783d3891735003fef2bc37e;hp=5c95933e739a43bc5cd30829e43c0381cff1e989;hpb=d8b5297f6d985d785b2d2869102933e81ca51c80;p=linux-2.6-microblaze.git 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);