mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-10 15:10:38 +00:00
[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>
This commit is contained in:
parent
42f3030f0c
commit
24c053e755
@ -40,7 +40,8 @@ static int ac97_prepare(struct snd_pcm_substream *substream)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#define STD_AC97_RATES (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_11025 |\
|
#define STD_AC97_RATES (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_11025 |\
|
||||||
SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000)
|
SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_44100 |\
|
||||||
|
SNDRV_PCM_RATE_48000)
|
||||||
|
|
||||||
struct snd_soc_codec_dai ac97_dai = {
|
struct snd_soc_codec_dai ac97_dai = {
|
||||||
.name = "AC97 HiFi",
|
.name = "AC97 HiFi",
|
||||||
@ -86,7 +87,7 @@ static int ac97_soc_probe(struct platform_device *pdev)
|
|||||||
printk(KERN_INFO "AC97 SoC Audio Codec %s\n", AC97_VERSION);
|
printk(KERN_INFO "AC97 SoC Audio Codec %s\n", AC97_VERSION);
|
||||||
|
|
||||||
socdev->codec = kzalloc(sizeof(struct snd_soc_codec), GFP_KERNEL);
|
socdev->codec = kzalloc(sizeof(struct snd_soc_codec), GFP_KERNEL);
|
||||||
if (socdev->codec == NULL)
|
if (!socdev->codec)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
codec = socdev->codec;
|
codec = socdev->codec;
|
||||||
mutex_init(&codec->mutex);
|
mutex_init(&codec->mutex);
|
||||||
@ -135,7 +136,7 @@ static int ac97_soc_remove(struct platform_device *pdev)
|
|||||||
struct snd_soc_device *socdev = platform_get_drvdata(pdev);
|
struct snd_soc_device *socdev = platform_get_drvdata(pdev);
|
||||||
struct snd_soc_codec *codec = socdev->codec;
|
struct snd_soc_codec *codec = socdev->codec;
|
||||||
|
|
||||||
if(codec == NULL)
|
if (!codec)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
snd_soc_free_pcms(socdev);
|
snd_soc_free_pcms(socdev);
|
||||||
@ -149,7 +150,6 @@ struct snd_soc_codec_device soc_codec_dev_ac97= {
|
|||||||
.probe = ac97_soc_probe,
|
.probe = ac97_soc_probe,
|
||||||
.remove = ac97_soc_remove,
|
.remove = ac97_soc_remove,
|
||||||
};
|
};
|
||||||
|
|
||||||
EXPORT_SYMBOL_GPL(soc_codec_dev_ac97);
|
EXPORT_SYMBOL_GPL(soc_codec_dev_ac97);
|
||||||
|
|
||||||
MODULE_DESCRIPTION("Soc Generic AC97 driver");
|
MODULE_DESCRIPTION("Soc Generic AC97 driver");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user