[alsa-devel] [PATCH 7/7] S3C PCM: Added the CPU driver for PCM controllers

Mark Brown broonie at opensource.wolfsonmicro.com
Sat Nov 7 13:27:37 CET 2009


On Sat, Nov 07, 2009 at 12:18:10PM +0900, jassi brar wrote:
> On Sat, Nov 7, 2009 at 2:50 AM, Mark Brown

> > May as well just clk_set_rate() unconditionally, it'll do no harm to do
> > a null change.

> I believe the clock sources should be touched only when we can't do without it.
> clk_get_rate doesn't touch any register, but clk_set_rate does even if overwrite
> the same value.

I can see your point but if this is required it feels like something
that the clock API ought to be handling it - the same code should be
added pretty much every time the clock might be set.

> >> +     /* Check for valid device index */
> >> +     if (pdev->id >= ARRAY_SIZE(s3c_pcm)) {
> >> +             dev_err(&pdev->dev, "id %d out of range\n", pdev->id);
> >> +             return -EINVAL;
> >> +     }
> >
> > id could be less than zero too.

> okay. Though i wonder how did it pass review in s3c64xx-i2s.c

When the drivers were originally merged there were quite a few issues
that needed fixing up but it was felt that it was better to get the code
into mainline where it could be worked on more readily.  Ben didn't
really have any time to do much work on the drivers at the time and this
way it's easier for others to pitch in and fix up problems.


More information about the Alsa-devel mailing list