[alsa-devel] [PATCH 1/2] ASoC: Refector DAPM event handler

Mark Brown broonie at opensource.wolfsonmicro.com
Thu Jul 17 15:48:06 CEST 2008

On Thu, Jul 17, 2008 at 02:45:19PM +0200, Takashi Iwai wrote:

> With this patch, dapm_update_bits() is called even when
> power_change=0, so it changes the behavior.  You can check
> power_change only once and skip the rest via continue if it's false.

Fixed - dapm_update_bits() already suppresses duplicate writes.

> Also, better to put parentheses around bit-and operation.

Fixed.  As with some other things it might be worth adding checks you
want like this to checkpatch.

> Anyway, if the indent level really matters, you should better to put
> it as a function.

The new indentation level is fine - the major issue was that the old
layout was over 80 columns already (checkpatch!), plus the way it was
structured would lead to exploding nesting levels when new cases were
added.  Splitting it out would only move it away from the handling of
other widgets which wouldn't help so much.

I'll resubmit shortly.

More information about the Alsa-devel mailing list