diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2008-04-23 09:16:46 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2008-04-24 06:00:43 -0400 |
commit | d454aee9be72472ee18b5397fda2c673f40a1e69 (patch) | |
tree | a613906b16b4be77f1b1b18e58d79a43a87af05c /sound/soc/codecs/wm8731.c | |
parent | b32432e3f2d386d9563669c8cfdeaa473bfd8572 (diff) |
[ALSA] soc - wm8731 - Clean up checkpatch warnings
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/soc/codecs/wm8731.c')
-rw-r--r-- | sound/soc/codecs/wm8731.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/sound/soc/codecs/wm8731.c b/sound/soc/codecs/wm8731.c index 9c33fe874928..0cf9265fca8f 100644 --- a/sound/soc/codecs/wm8731.c +++ b/sound/soc/codecs/wm8731.c | |||
@@ -110,7 +110,7 @@ static int wm8731_write(struct snd_soc_codec *codec, unsigned int reg, | |||
110 | data[0] = (reg << 1) | ((value >> 8) & 0x0001); | 110 | data[0] = (reg << 1) | ((value >> 8) & 0x0001); |
111 | data[1] = value & 0x00ff; | 111 | data[1] = value & 0x00ff; |
112 | 112 | ||
113 | wm8731_write_reg_cache (codec, reg, value); | 113 | wm8731_write_reg_cache(codec, reg, value); |
114 | if (codec->hw_write(codec->control_data, data, 2) == 2) | 114 | if (codec->hw_write(codec->control_data, data, 2) == 2) |
115 | return 0; | 115 | return 0; |
116 | else | 116 | else |
@@ -154,8 +154,10 @@ static int wm8731_add_controls(struct snd_soc_codec *codec) | |||
154 | int err, i; | 154 | int err, i; |
155 | 155 | ||
156 | for (i = 0; i < ARRAY_SIZE(wm8731_snd_controls); i++) { | 156 | for (i = 0; i < ARRAY_SIZE(wm8731_snd_controls); i++) { |
157 | if ((err = snd_ctl_add(codec->card, | 157 | err = snd_ctl_add(codec->card, |
158 | snd_soc_cnew(&wm8731_snd_controls[i],codec, NULL))) < 0) | 158 | snd_soc_cnew(&wm8731_snd_controls[i], |
159 | codec, NULL)); | ||
160 | if (err < 0) | ||
159 | return err; | 161 | return err; |
160 | } | 162 | } |
161 | 163 | ||
@@ -221,15 +223,13 @@ static int wm8731_add_widgets(struct snd_soc_codec *codec) | |||
221 | { | 223 | { |
222 | int i; | 224 | int i; |
223 | 225 | ||
224 | for(i = 0; i < ARRAY_SIZE(wm8731_dapm_widgets); i++) { | 226 | for (i = 0; i < ARRAY_SIZE(wm8731_dapm_widgets); i++) |
225 | snd_soc_dapm_new_control(codec, &wm8731_dapm_widgets[i]); | 227 | snd_soc_dapm_new_control(codec, &wm8731_dapm_widgets[i]); |
226 | } | ||
227 | 228 | ||
228 | /* set up audio path interconnects */ | 229 | /* set up audio path interconnects */ |
229 | for(i = 0; intercon[i][0] != NULL; i++) { | 230 | for (i = 0; intercon[i][0] != NULL; i++) |
230 | snd_soc_dapm_connect_input(codec, intercon[i][0], | 231 | snd_soc_dapm_connect_input(codec, intercon[i][0], |
231 | intercon[i][1], intercon[i][2]); | 232 | intercon[i][1], intercon[i][2]); |
232 | } | ||
233 | 233 | ||
234 | snd_soc_dapm_new_widgets(codec); | 234 | snd_soc_dapm_new_widgets(codec); |
235 | return 0; | 235 | return 0; |
@@ -589,7 +589,7 @@ pcm_err: | |||
589 | 589 | ||
590 | static struct snd_soc_device *wm8731_socdev; | 590 | static struct snd_soc_device *wm8731_socdev; |
591 | 591 | ||
592 | #if defined (CONFIG_I2C) || defined (CONFIG_I2C_MODULE) | 592 | #if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) |
593 | 593 | ||
594 | /* | 594 | /* |
595 | * WM8731 2 wire address is determined by GPIO5 | 595 | * WM8731 2 wire address is determined by GPIO5 |
@@ -651,7 +651,7 @@ err: | |||
651 | 651 | ||
652 | static int wm8731_i2c_detach(struct i2c_client *client) | 652 | static int wm8731_i2c_detach(struct i2c_client *client) |
653 | { | 653 | { |
654 | struct snd_soc_codec* codec = i2c_get_clientdata(client); | 654 | struct snd_soc_codec *codec = i2c_get_clientdata(client); |
655 | i2c_detach_client(client); | 655 | i2c_detach_client(client); |
656 | kfree(codec->reg_cache); | 656 | kfree(codec->reg_cache); |
657 | kfree(client); | 657 | kfree(client); |
@@ -709,7 +709,7 @@ static int wm8731_probe(struct platform_device *pdev) | |||
709 | INIT_LIST_HEAD(&codec->dapm_paths); | 709 | INIT_LIST_HEAD(&codec->dapm_paths); |
710 | 710 | ||
711 | wm8731_socdev = socdev; | 711 | wm8731_socdev = socdev; |
712 | #if defined (CONFIG_I2C) || defined (CONFIG_I2C_MODULE) | 712 | #if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) |
713 | if (setup->i2c_address) { | 713 | if (setup->i2c_address) { |
714 | normal_i2c[0] = setup->i2c_address; | 714 | normal_i2c[0] = setup->i2c_address; |
715 | codec->hw_write = (hw_write_t)i2c_master_send; | 715 | codec->hw_write = (hw_write_t)i2c_master_send; |
@@ -734,7 +734,7 @@ static int wm8731_remove(struct platform_device *pdev) | |||
734 | 734 | ||
735 | snd_soc_free_pcms(socdev); | 735 | snd_soc_free_pcms(socdev); |
736 | snd_soc_dapm_free(socdev); | 736 | snd_soc_dapm_free(socdev); |
737 | #if defined (CONFIG_I2C) || defined (CONFIG_I2C_MODULE) | 737 | #if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) |
738 | i2c_del_driver(&wm8731_i2c_driver); | 738 | i2c_del_driver(&wm8731_i2c_driver); |
739 | #endif | 739 | #endif |
740 | kfree(codec->private_data); | 740 | kfree(codec->private_data); |
@@ -749,7 +749,6 @@ struct snd_soc_codec_device soc_codec_dev_wm8731 = { | |||
749 | .suspend = wm8731_suspend, | 749 | .suspend = wm8731_suspend, |
750 | .resume = wm8731_resume, | 750 | .resume = wm8731_resume, |
751 | }; | 751 | }; |
752 | |||
753 | EXPORT_SYMBOL_GPL(soc_codec_dev_wm8731); | 752 | EXPORT_SYMBOL_GPL(soc_codec_dev_wm8731); |
754 | 753 | ||
755 | MODULE_DESCRIPTION("ASoC WM8731 driver"); | 754 | MODULE_DESCRIPTION("ASoC WM8731 driver"); |