ASoC: Intel: mrfld: simplify sst_fill_widget_module_info
authorRasmus Villemoes <linux@rasmusvillemoes.dk>
Thu, 4 Jun 2015 08:13:53 +0000 (10:13 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 15 Jun 2015 09:50:28 +0000 (10:50 +0100)
commit6846e18a1e71360e76509f8d8235679a97b2437c
treead3a0b71e9824f71a2637ae1eb68a0c3de348178
parentfd35e37510e940ef360cde5adfa35eb4fdfe018c
ASoC: Intel: mrfld: simplify sst_fill_widget_module_info

Some tiny improvements, cutting 180 bytes off the generated code.

- use strchr() for single-character needle

- compute index using pointer subtraction instead of two strlen()
  calls

- factor out the common check for whether the initial part of
  kctl->id.name (before the space) is identical to w->name.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Tested-by: Fang, Yang A <yang.a.fang@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/atom/sst-atom-controls.c