aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2008-04-23 09:26:45 -0400
committerTakashi Iwai <tiwai@suse.de>2008-04-24 06:00:44 -0400
commit24c053e755f2f77d9c9d9a9250ca1132eae280e7 (patch)
tree90cb02ca02abaa5248328ec28ed68f0585608e48 /sound
parent42f3030f0cac474fc3232c8028b97f54b985718c (diff)
[ALSA] soc - ac97 - Clean up checkpatch warnings
Also change some if (x == NULL) to if (!x). Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/ac97.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/sound/soc/codecs/ac97.c b/sound/soc/codecs/ac97.c
index 242130cf1abd..2a1ffe396908 100644
--- a/sound/soc/codecs/ac97.c
+++ b/sound/soc/codecs/ac97.c
@@ -40,7 +40,8 @@ static int ac97_prepare(struct snd_pcm_substream *substream)
40} 40}
41 41
42#define STD_AC97_RATES (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_11025 |\ 42#define STD_AC97_RATES (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_11025 |\
43 SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000) 43 SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_44100 |\
44 SNDRV_PCM_RATE_48000)
44 45
45struct snd_soc_codec_dai ac97_dai = { 46struct snd_soc_codec_dai ac97_dai = {
46 .name = "AC97 HiFi", 47 .name = "AC97 HiFi",
@@ -86,7 +87,7 @@ static int ac97_soc_probe(struct platform_device *pdev)
86 printk(KERN_INFO "AC97 SoC Audio Codec %s\n", AC97_VERSION); 87 printk(KERN_INFO "AC97 SoC Audio Codec %s\n", AC97_VERSION);
87 88
88 socdev->codec = kzalloc(sizeof(struct snd_soc_codec), GFP_KERNEL); 89 socdev->codec = kzalloc(sizeof(struct snd_soc_codec), GFP_KERNEL);
89 if (socdev->codec == NULL) 90 if (!socdev->codec)
90 return -ENOMEM; 91 return -ENOMEM;
91 codec = socdev->codec; 92 codec = socdev->codec;
92 mutex_init(&codec->mutex); 93 mutex_init(&codec->mutex);
@@ -102,17 +103,17 @@ static int ac97_soc_probe(struct platform_device *pdev)
102 103
103 /* register pcms */ 104 /* register pcms */
104 ret = snd_soc_new_pcms(socdev, SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1); 105 ret = snd_soc_new_pcms(socdev, SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1);
105 if(ret < 0) 106 if (ret < 0)
106 goto err; 107 goto err;
107 108
108 /* add codec as bus device for standard ac97 */ 109 /* add codec as bus device for standard ac97 */
109 ret = snd_ac97_bus(codec->card, 0, &soc_ac97_ops, NULL, &ac97_bus); 110 ret = snd_ac97_bus(codec->card, 0, &soc_ac97_ops, NULL, &ac97_bus);
110 if(ret < 0) 111 if (ret < 0)
111 goto bus_err; 112 goto bus_err;
112 113
113 memset(&ac97_template, 0, sizeof(struct snd_ac97_template)); 114 memset(&ac97_template, 0, sizeof(struct snd_ac97_template));
114 ret = snd_ac97_mixer(ac97_bus, &ac97_template, &codec->ac97); 115 ret = snd_ac97_mixer(ac97_bus, &ac97_template, &codec->ac97);
115 if(ret < 0) 116 if (ret < 0)
116 goto bus_err; 117 goto bus_err;
117 118
118 ret = snd_soc_register_card(socdev); 119 ret = snd_soc_register_card(socdev);
@@ -135,7 +136,7 @@ static int ac97_soc_remove(struct platform_device *pdev)
135 struct snd_soc_device *socdev = platform_get_drvdata(pdev); 136 struct snd_soc_device *socdev = platform_get_drvdata(pdev);
136 struct snd_soc_codec *codec = socdev->codec; 137 struct snd_soc_codec *codec = socdev->codec;
137 138
138 if(codec == NULL) 139 if (!codec)
139 return 0; 140 return 0;
140 141
141 snd_soc_free_pcms(socdev); 142 snd_soc_free_pcms(socdev);
@@ -145,11 +146,10 @@ static int ac97_soc_remove(struct platform_device *pdev)
145 return 0; 146 return 0;
146} 147}
147 148
148struct snd_soc_codec_device soc_codec_dev_ac97= { 149struct snd_soc_codec_device soc_codec_dev_ac97 = {
149 .probe = ac97_soc_probe, 150 .probe = ac97_soc_probe,
150 .remove = ac97_soc_remove, 151 .remove = ac97_soc_remove,
151}; 152};
152
153EXPORT_SYMBOL_GPL(soc_codec_dev_ac97); 153EXPORT_SYMBOL_GPL(soc_codec_dev_ac97);
154 154
155MODULE_DESCRIPTION("Soc Generic AC97 driver"); 155MODULE_DESCRIPTION("Soc Generic AC97 driver");