aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2008-04-23 09:17:12 -0400
committerTakashi Iwai <tiwai@suse.de>2008-04-24 06:00:43 -0400
commit42f3030f0cac474fc3232c8028b97f54b985718c (patch)
tree6afdb199ce724e09092e05fa4e32a7edfc86def2 /sound/soc
parentd454aee9be72472ee18b5397fda2c673f40a1e69 (diff)
[ALSA] soc - wm8750 - 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')
-rw-r--r--sound/soc/codecs/wm8750.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/sound/soc/codecs/wm8750.c b/sound/soc/codecs/wm8750.c
index 77a857b997a2..16cd5d4d5ad9 100644
--- a/sound/soc/codecs/wm8750.c
+++ b/sound/soc/codecs/wm8750.c
@@ -110,7 +110,7 @@ static int wm8750_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 wm8750_write_reg_cache (codec, reg, value); 113 wm8750_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
@@ -257,7 +257,8 @@ static int wm8750_add_controls(struct snd_soc_codec *codec)
257 257
258 for (i = 0; i < ARRAY_SIZE(wm8750_snd_controls); i++) { 258 for (i = 0; i < ARRAY_SIZE(wm8750_snd_controls); i++) {
259 err = snd_ctl_add(codec->card, 259 err = snd_ctl_add(codec->card,
260 snd_soc_cnew(&wm8750_snd_controls[i],codec, NULL)); 260 snd_soc_cnew(&wm8750_snd_controls[i],
261 codec, NULL));
261 if (err < 0) 262 if (err < 0)
262 return err; 263 return err;
263 } 264 }
@@ -478,15 +479,13 @@ static int wm8750_add_widgets(struct snd_soc_codec *codec)
478{ 479{
479 int i; 480 int i;
480 481
481 for(i = 0; i < ARRAY_SIZE(wm8750_dapm_widgets); i++) { 482 for (i = 0; i < ARRAY_SIZE(wm8750_dapm_widgets); i++)
482 snd_soc_dapm_new_control(codec, &wm8750_dapm_widgets[i]); 483 snd_soc_dapm_new_control(codec, &wm8750_dapm_widgets[i]);
483 }
484 484
485 /* set up audio path audio_mapnects */ 485 /* set up audio path audio_mapnects */
486 for(i = 0; audio_map[i][0] != NULL; i++) { 486 for (i = 0; audio_map[i][0] != NULL; i++)
487 snd_soc_dapm_connect_input(codec, audio_map[i][0], 487 snd_soc_dapm_connect_input(codec, audio_map[i][0],
488 audio_map[i][1], audio_map[i][2]); 488 audio_map[i][1], audio_map[i][2]);
489 }
490 489
491 snd_soc_dapm_new_widgets(codec); 490 snd_soc_dapm_new_widgets(codec);
492 return 0; 491 return 0;
@@ -714,8 +713,8 @@ static int wm8750_dapm_event(struct snd_soc_codec *codec, int event)
714} 713}
715 714
716#define WM8750_RATES (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_11025 |\ 715#define WM8750_RATES (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_11025 |\
717 SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_44100 | \ 716 SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_44100 | \
718 SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000) 717 SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000)
719 718
720#define WM8750_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\ 719#define WM8750_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\
721 SNDRV_PCM_FMTBIT_S24_LE) 720 SNDRV_PCM_FMTBIT_S24_LE)
@@ -784,7 +783,8 @@ static int wm8750_resume(struct platform_device *pdev)
784 if (codec->suspend_dapm_state == SNDRV_CTL_POWER_D0) { 783 if (codec->suspend_dapm_state == SNDRV_CTL_POWER_D0) {
785 wm8750_dapm_event(codec, SNDRV_CTL_POWER_D2); 784 wm8750_dapm_event(codec, SNDRV_CTL_POWER_D2);
786 codec->dapm_state = SNDRV_CTL_POWER_D0; 785 codec->dapm_state = SNDRV_CTL_POWER_D0;
787 schedule_delayed_work(&codec->delayed_work, msecs_to_jiffies(1000)); 786 schedule_delayed_work(&codec->delayed_work,
787 msecs_to_jiffies(1000));
788 } 788 }
789 789
790 return 0; 790 return 0;
@@ -864,7 +864,7 @@ pcm_err:
864 around */ 864 around */
865static struct snd_soc_device *wm8750_socdev; 865static struct snd_soc_device *wm8750_socdev;
866 866
867#if defined (CONFIG_I2C) || defined (CONFIG_I2C_MODULE) 867#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
868 868
869/* 869/*
870 * WM8731 2 wire address is determined by GPIO5 870 * WM8731 2 wire address is determined by GPIO5
@@ -979,8 +979,8 @@ static int wm8750_probe(struct platform_device *pdev)
979 INIT_LIST_HEAD(&codec->dapm_paths); 979 INIT_LIST_HEAD(&codec->dapm_paths);
980 wm8750_socdev = socdev; 980 wm8750_socdev = socdev;
981 INIT_DELAYED_WORK(&codec->delayed_work, wm8750_work); 981 INIT_DELAYED_WORK(&codec->delayed_work, wm8750_work);
982 982
983#if defined (CONFIG_I2C) || defined (CONFIG_I2C_MODULE) 983#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
984 if (setup->i2c_address) { 984 if (setup->i2c_address) {
985 normal_i2c[0] = setup->i2c_address; 985 normal_i2c[0] = setup->i2c_address;
986 codec->hw_write = (hw_write_t)i2c_master_send; 986 codec->hw_write = (hw_write_t)i2c_master_send;
@@ -1025,7 +1025,7 @@ static int wm8750_remove(struct platform_device *pdev)
1025 run_delayed_work(&codec->delayed_work); 1025 run_delayed_work(&codec->delayed_work);
1026 snd_soc_free_pcms(socdev); 1026 snd_soc_free_pcms(socdev);
1027 snd_soc_dapm_free(socdev); 1027 snd_soc_dapm_free(socdev);
1028#if defined (CONFIG_I2C) || defined (CONFIG_I2C_MODULE) 1028#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
1029 i2c_del_driver(&wm8750_i2c_driver); 1029 i2c_del_driver(&wm8750_i2c_driver);
1030#endif 1030#endif
1031 kfree(codec->private_data); 1031 kfree(codec->private_data);
@@ -1040,7 +1040,6 @@ struct snd_soc_codec_device soc_codec_dev_wm8750 = {
1040 .suspend = wm8750_suspend, 1040 .suspend = wm8750_suspend,
1041 .resume = wm8750_resume, 1041 .resume = wm8750_resume,
1042}; 1042};
1043
1044EXPORT_SYMBOL_GPL(soc_codec_dev_wm8750); 1043EXPORT_SYMBOL_GPL(soc_codec_dev_wm8750);
1045 1044
1046MODULE_DESCRIPTION("ASoC WM8750 driver"); 1045MODULE_DESCRIPTION("ASoC WM8750 driver");