summaryrefslogtreecommitdiffstats
path: root/drivers/misc
diff options
context:
space:
mode:
authorLinus Torvalds2013-07-26 20:25:25 +0200
committerLinus Torvalds2013-07-26 20:25:25 +0200
commit8f074a557104aed6f7b0a0913227039481da3449 (patch)
tree0876c1c94dfc705567628ea3f99962bdfa7a8da8 /drivers/misc
parentMerge tag 'for-linus-v3.11-rc3' of git://oss.sgi.com/xfs/xfs (diff)
parentMerge tag 'asoc-v3.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/b... (diff)
downloadkernel-qcow2-linux-8f074a557104aed6f7b0a0913227039481da3449.tar.gz
kernel-qcow2-linux-8f074a557104aed6f7b0a0913227039481da3449.tar.xz
kernel-qcow2-linux-8f074a557104aed6f7b0a0913227039481da3449.zip
Merge tag 'sound-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai: "Just a handful of regression and small fixes in ASoC, HD-audio and USB-audio drivers. - Sigmetal HD-audio codec regression fixes - A copule of XRUN indication fixes for usb-audio devices - ASoC: ep93xx build fix, sgtl5000 fix for probe order changes, max98088 register access fix, etc" * tag 'sound-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hiface: return correct XRUN indication ASoC: tegra: correct playback_dma_data setup ASoC: core: double free in snd_soc_add_platform() ALSA: usb-audio: 6fire: return correct XRUN indication ASoC: ep93xx: fix build of ep93xx-ac97.c ALSA: hda - Remove NO_PRESENCE bit override for Dell 1420n Laptop ALSA: hda - Fix EAPD GPIO control for Sigmatel codecs ASoC: atmel-ssc: remove clk_disable_unprepare call from critical section ASoC: sgtl5000: defer the probe if clock is not found ASoC: max98088 - fix element type of the register cache.
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/atmel-ssc.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/misc/atmel-ssc.c b/drivers/misc/atmel-ssc.c
index f7b90661e321..e068a76a5f6f 100644
--- a/drivers/misc/atmel-ssc.c
+++ b/drivers/misc/atmel-ssc.c
@@ -66,14 +66,19 @@ EXPORT_SYMBOL(ssc_request);
void ssc_free(struct ssc_device *ssc)
{
+ bool disable_clk = true;
+
spin_lock(&user_lock);
- if (ssc->user) {
+ if (ssc->user)
ssc->user--;
- clk_disable_unprepare(ssc->clk);
- } else {
+ else {
+ disable_clk = false;
dev_dbg(&ssc->pdev->dev, "device already free\n");
}
spin_unlock(&user_lock);
+
+ if (disable_clk)
+ clk_disable_unprepare(ssc->clk);
}
EXPORT_SYMBOL(ssc_free);