Skip to content

Commit

Permalink
ASoC: S3C2412: I2S: Return correct source clock
Browse files Browse the repository at this point in the history
Until now, s3c2412_get_iisclk would return NULL since iis_clk was never
initialized.
Return appropriate pointer as per the selection made for source clock.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Ben Dooks <ben-linux@fluff.org>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Jassi Brar authored and Mark Brown committed May 5, 2010
1 parent ce76f9f commit d79696f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion sound/soc/s3c24xx/s3c2412-i2s.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,13 @@ static int s3c2412_i2s_set_sysclk(struct snd_soc_dai *cpu_dai,

struct clk *s3c2412_get_iisclk(void)
{
return s3c2412_i2s.iis_clk;
struct s3c_i2sv2_info *i2s = &s3c2412_i2s;
u32 iismod = readl(i2s->regs + S3C2412_IISMOD);

if (iismod & S3C2412_IISMOD_IMS_SYSMUX)
return i2s->iis_cclk;
else
return i2s->iis_pclk;
}
EXPORT_SYMBOL_GPL(s3c2412_get_iisclk);

Expand Down

0 comments on commit d79696f

Please sign in to comment.