]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
sound/soc/pxa/mioa701_wm9713.c: Avoid using ARRAY_AND_SIZE(e) as a function argument
authorJulia Lawall <Julia.Lawall@lip6.fr>
Sun, 11 Aug 2013 16:51:42 +0000 (18:51 +0200)
committerMark Brown <broonie@linaro.org>
Sun, 11 Aug 2013 18:06:32 +0000 (19:06 +0100)
Replace ARRAY_AND_SIZE(e) in function argument position to avoid hiding the
arity of the called function.

The semantic match that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression e,f;
@@

f(...,
- ARRAY_AND_SIZE(e)
+ e,ARRAY_SIZE(e)
  ,...)
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/pxa/mioa701_wm9713.c

index 97b711e12821e02c2b62c6ceb377fb4a942ee71f..20fdce61060c8769779443ae2dbc5f6b328d9403 100644 (file)
@@ -133,10 +133,11 @@ static int mioa701_wm9713_init(struct snd_soc_pcm_runtime *rtd)
        unsigned short reg;
 
        /* Add mioa701 specific widgets */
-       snd_soc_dapm_new_controls(dapm, ARRAY_AND_SIZE(mioa701_dapm_widgets));
+       snd_soc_dapm_new_controls(dapm, mioa701_dapm_widgets,
+                                 ARRAY_SIZE(mioa701_dapm_widgets));
 
        /* Set up mioa701 specific audio path audio_mapnects */
-       snd_soc_dapm_add_routes(dapm, ARRAY_AND_SIZE(audio_map));
+       snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map));
 
        /* Prepare GPIO8 for rear speaker amplifier */
        reg = codec->driver->read(codec, AC97_GPIO_CFG);