aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/mxs/mxs-saif.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-02-02 11:24:44 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-02-02 11:24:44 -0800
commitbd1d462e13b278fc57752d0b9b15040e60e561a0 (patch)
treee2fdf1c18a93aab02830bcb8a5db8cdddfbb63a8 /sound/soc/mxs/mxs-saif.c
parentsysfs: Update the name hash when renaming sysfs entries (diff)
parentLinux 3.3-rc2 (diff)
downloadlinux-dev-bd1d462e13b278fc57752d0b9b15040e60e561a0.tar.xz
linux-dev-bd1d462e13b278fc57752d0b9b15040e60e561a0.zip
Merge 3.3-rc2 into the driver-core-next branch.
This was done to resolve a merge and build problem with the drivers/acpi/processor_driver.c file. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound/soc/mxs/mxs-saif.c')
-rw-r--r--sound/soc/mxs/mxs-saif.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/soc/mxs/mxs-saif.c b/sound/soc/mxs/mxs-saif.c
index dccfb37a9626..f204dbac11d4 100644
--- a/sound/soc/mxs/mxs-saif.c
+++ b/sound/soc/mxs/mxs-saif.c
@@ -124,6 +124,8 @@ static int mxs_saif_set_clk(struct mxs_saif *saif,
*
* If MCLK is not used, we just set saif clk to 512*fs.
*/
+ clk_prepare_enable(master_saif->clk);
+
if (master_saif->mclk_in_use) {
if (mclk % 32 == 0) {
scr &= ~BM_SAIF_CTRL_BITCLK_BASE_RATE;
@@ -133,6 +135,7 @@ static int mxs_saif_set_clk(struct mxs_saif *saif,
ret = clk_set_rate(master_saif->clk, 384 * rate);
} else {
/* SAIF MCLK should be either 32x or 48x */
+ clk_disable_unprepare(master_saif->clk);
return -EINVAL;
}
} else {
@@ -140,6 +143,8 @@ static int mxs_saif_set_clk(struct mxs_saif *saif,
scr &= ~BM_SAIF_CTRL_BITCLK_BASE_RATE;
}
+ clk_disable_unprepare(master_saif->clk);
+
if (ret)
return ret;