Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 270797
b: refs/heads/master
c: ac60155
h: refs/heads/master
i:
  270795: 599f13a
v: v3
  • Loading branch information
Axel Lin authored and Mark Brown committed Oct 6, 2011
1 parent e57c8b0 commit 414a1a0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3c08600144f2a15fb3fba31b54cd6600371db6ef
refs/heads/master: ac60155f7afa3fd819befa35c2740a7a0d2f1a39
8 changes: 4 additions & 4 deletions trunk/sound/soc/codecs/cs4270.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,6 @@ static int cs4270_set_dai_fmt(struct snd_soc_dai *codec_dai,
{
struct snd_soc_codec *codec = codec_dai->codec;
struct cs4270_private *cs4270 = snd_soc_codec_get_drvdata(codec);
int ret = 0;

/* set DAI format */
switch (format & SND_SOC_DAIFMT_FORMAT_MASK) {
Expand All @@ -271,7 +270,7 @@ static int cs4270_set_dai_fmt(struct snd_soc_dai *codec_dai,
break;
default:
dev_err(codec->dev, "invalid dai format\n");
ret = -EINVAL;
return -EINVAL;
}

/* set master/slave audio interface */
Expand All @@ -284,10 +283,11 @@ static int cs4270_set_dai_fmt(struct snd_soc_dai *codec_dai,
break;
default:
/* all other modes are unsupported by the hardware */
ret = -EINVAL;
dev_err(codec->dev, "Unknown master/slave configuration\n");
return -EINVAL;
}

return ret;
return 0;
}

/**
Expand Down
9 changes: 4 additions & 5 deletions trunk/sound/soc/codecs/cs42l51.c
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,6 @@ static int cs42l51_set_dai_fmt(struct snd_soc_dai *codec_dai,
{
struct snd_soc_codec *codec = codec_dai->codec;
struct cs42l51_private *cs42l51 = snd_soc_codec_get_drvdata(codec);
int ret = 0;

switch (format & SND_SOC_DAIFMT_FORMAT_MASK) {
case SND_SOC_DAIFMT_I2S:
Expand All @@ -298,7 +297,7 @@ static int cs42l51_set_dai_fmt(struct snd_soc_dai *codec_dai,
break;
default:
dev_err(codec->dev, "invalid DAI format\n");
ret = -EINVAL;
return -EINVAL;
}

switch (format & SND_SOC_DAIFMT_MASTER_MASK) {
Expand All @@ -309,11 +308,11 @@ static int cs42l51_set_dai_fmt(struct snd_soc_dai *codec_dai,
cs42l51->func = MODE_SLAVE_AUTO;
break;
default:
ret = -EINVAL;
break;
dev_err(codec->dev, "Unknown master/slave configuration\n");
return -EINVAL;
}

return ret;
return 0;
}

struct cs42l51_ratios {
Expand Down

0 comments on commit 414a1a0

Please sign in to comment.