At Mon, 23 Jul 2007 16:43:14 -0700 (PDT), Trent Piepho wrote:
On Mon, 23 Jul 2007, Takashi Iwai wrote:
At Sat, 21 Jul 2007 17:10:08 -0700 (PDT), Thanks, the patch looks almost fine, but please fix the following minor issues:
- Try to avoid a magic number, e.g. >> 9.
Ok, I added a bunch of the fields from the WM8768 datasheet that could be useful.
Thanks, that's _much_ better.
- put callback should return 0 for non-changed value, a positive (usually 1) when the value is changed, and a negative error code for errors.
It will now return 0 if the value wasn't changed and also not do the unnecessary spi write.
- Try to keep lines within 80 chars (to follow the standard coding style). I know that other codes there are not, but don't care now. We'll fix them later, too.
Also done. The loops that add the controls have long lines that didn't wrap well. So I made a second patch that converts the loop I added plus the two existing loops into a macro, which IMHO looks a lot nicer and reduces code duplication.
Yes. I fixed the macro to wrap with do {} while (0), and use temporary variables to be more safe.
Both patches are applied now to ALSA HG tree.
Takashi