[ALSA] ASoC: core checkpatch cleanups

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Mark Brown 2008-05-19 12:32:25 +02:00 committed by Jaroslav Kysela
parent 0be9898adb
commit 3ff3f64ba0
1 changed files with 54 additions and 46 deletions

View File

@ -178,9 +178,11 @@ static int soc_pcm_open(struct snd_pcm_substream *substream)
/* Check that the codec and cpu DAI's are compatible */
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
runtime->hw.rate_min =
max(codec_dai->playback.rate_min, cpu_dai->playback.rate_min);
max(codec_dai->playback.rate_min,
cpu_dai->playback.rate_min);
runtime->hw.rate_max =
min(codec_dai->playback.rate_max, cpu_dai->playback.rate_max);
min(codec_dai->playback.rate_max,
cpu_dai->playback.rate_max);
runtime->hw.channels_min =
max(codec_dai->playback.channels_min,
cpu_dai->playback.channels_min);
@ -193,9 +195,11 @@ static int soc_pcm_open(struct snd_pcm_substream *substream)
codec_dai->playback.rates & cpu_dai->playback.rates;
} else {
runtime->hw.rate_min =
max(codec_dai->capture.rate_min, cpu_dai->capture.rate_min);
max(codec_dai->capture.rate_min,
cpu_dai->capture.rate_min);
runtime->hw.rate_max =
min(codec_dai->capture.rate_max, cpu_dai->capture.rate_max);
min(codec_dai->capture.rate_max,
cpu_dai->capture.rate_max);
runtime->hw.channels_min =
max(codec_dai->capture.channels_min,
cpu_dai->capture.channels_min);
@ -511,7 +515,7 @@ static int soc_pcm_hw_params(struct snd_pcm_substream *substream,
if (cpu_dai->ops.hw_params) {
ret = cpu_dai->ops.hw_params(substream, params);
if (ret < 0) {
printk(KERN_ERR "asoc: can't set interface %s hw params\n",
printk(KERN_ERR "asoc: interface %s hw params failed\n",
cpu_dai->name);
goto interface_err;
}
@ -520,7 +524,7 @@ static int soc_pcm_hw_params(struct snd_pcm_substream *substream,
if (platform->pcm_ops->hw_params) {
ret = platform->pcm_ops->hw_params(substream, params);
if (ret < 0) {
printk(KERN_ERR "asoc: can't set platform %s hw params\n",
printk(KERN_ERR "asoc: platform %s hw params failed\n",
platform->name);
goto platform_err;
}
@ -720,7 +724,7 @@ static int soc_resume(struct platform_device *pdev)
SND_SOC_DAPM_STREAM_RESUME);
}
/* unmute any active DAC's */
/* unmute any active DACs */
for (i = 0; i < machine->num_links; i++) {
struct snd_soc_codec_dai *dai = machine->dai_link[i].codec_dai;
if (dai->dai_ops.digital_mute && dai->playback.active)
@ -876,7 +880,8 @@ static int soc_new_pcm(struct snd_soc_device *socdev,
ret = snd_pcm_new(codec->card, new_name, codec->pcm_devs++, playback,
capture, &pcm);
if (ret < 0) {
printk(KERN_ERR "asoc: can't create pcm for codec %s\n", codec->name);
printk(KERN_ERR "asoc: can't create pcm for codec %s\n",
codec->name);
kfree(rtd);
return ret;
}
@ -926,7 +931,8 @@ static ssize_t codec_reg_show(struct device *dev,
count += sprintf(buf, "%s registers\n", codec->name);
for (i = 0; i < codec->reg_cache_size; i += step)
count += sprintf(buf + count, "%2x: %4x\n", i, codec->read(codec, i));
count += sprintf(buf + count, "%2x: %4x\n", i,
codec->read(codec, i));
return count;
}
@ -1119,7 +1125,7 @@ int snd_soc_register_card(struct snd_soc_device *socdev)
ret = snd_card_register(codec->card);
if (ret < 0) {
printk(KERN_ERR "asoc: failed to register soundcard for codec %s\n",
printk(KERN_ERR "asoc: failed to register soundcard for %s\n",
codec->name);
goto out;
}
@ -1143,7 +1149,7 @@ int snd_soc_register_card(struct snd_soc_device *socdev)
err = device_create_file(socdev->dev, &dev_attr_codec_reg);
if (err < 0)
printk(KERN_WARNING "asoc: failed to add codec sysfs entries\n");
printk(KERN_WARNING "asoc: failed to add codec sysfs files\n");
mutex_unlock(&codec->mutex);
@ -1279,7 +1285,8 @@ int snd_soc_get_enum_double(struct snd_kcontrol *kcontrol,
for (bitmask = 1; bitmask < e->mask; bitmask <<= 1)
;
val = snd_soc_read(codec, e->reg);
ucontrol->value.enumerated.item[0] = (val >> e->shift_l) & (bitmask - 1);
ucontrol->value.enumerated.item[0]
= (val >> e->shift_l) & (bitmask - 1);
if (e->shift_l != e->shift_r)
ucontrol->value.enumerated.item[1] =
(val >> e->shift_r) & (bitmask - 1);
@ -1573,7 +1580,8 @@ int snd_soc_put_volsw_2r(struct snd_kcontrol *kcontrol,
val = val << shift;
val2 = val2 << shift;
if ((err = snd_soc_update_bits(codec, reg, val_mask, val)) < 0)
err = snd_soc_update_bits(codec, reg, val_mask, val);
if (err < 0)
return err;
err = snd_soc_update_bits(codec, reg2, val_mask, val2);