ASoC: rsnd: Calculate DALIGN inversion at run-time
authorGeert Uytterhoeven <geert+renesas@glider.be>
Mon, 2 Dec 2019 15:58:34 +0000 (16:58 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 9 Dec 2019 18:35:00 +0000 (18:35 +0000)
commit49df1e3925824cf44e590daac635974270185841
treed9a802210400a4dfd8772d42669af54aa6f02087
parent3176f94c467cf89f74120c34a3ddd9aaf8941be2
ASoC: rsnd: Calculate DALIGN inversion at run-time

There is no need to store the inverted DALIGN values in the table, as
they can easily be calculated at run-time.  This also protects against
the introduction of inconsistencies between normal and inverted values
by a future table modification.

Reorder the two subexpressions in the AND check, to perform the least
expensive check first.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Eugeniu Rosca <erosca@de.adit-jv.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/20191202155834.22582-1-geert+renesas@glider.be
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sh/rcar/core.c