* [PATCH v2] sound: codecs: pcm1792a: clean function exit
@ 2015-11-25 8:10 Raphael Poggi
2015-11-25 8:18 ` Michael Trimarchi
0 siblings, 1 reply; 3+ messages in thread
From: Raphael Poggi @ 2015-11-25 8:10 UTC (permalink / raw)
To: michael, perex, tiwai; +Cc: linux-kernel, alsa-devel, Raphael Poggi
Signed-off-by: Raphael Poggi <poggi.raph@gmail.com>
---
sound/soc/codecs/pcm1792a.c | 15 +++------------
1 file changed, 3 insertions(+), 12 deletions(-)
diff --git a/sound/soc/codecs/pcm1792a.c b/sound/soc/codecs/pcm1792a.c
index 08bb486..27d54bc 100644
--- a/sound/soc/codecs/pcm1792a.c
+++ b/sound/soc/codecs/pcm1792a.c
@@ -91,14 +91,9 @@ static int pcm1792a_digital_mute(struct snd_soc_dai *dai, int mute)
{
struct snd_soc_codec *codec = dai->codec;
struct pcm1792a_private *priv = snd_soc_codec_get_drvdata(codec);
- int ret;
- ret = regmap_update_bits(priv->regmap, PCM1792A_SOFT_MUTE,
+ return regmap_update_bits(priv->regmap, PCM1792A_SOFT_MUTE,
PCM1792A_MUTE_MASK, !!mute);
- if (ret < 0)
- return ret;
-
- return 0;
}
static int pcm1792a_hw_params(struct snd_pcm_substream *substream,
@@ -107,7 +102,7 @@ static int pcm1792a_hw_params(struct snd_pcm_substream *substream,
{
struct snd_soc_codec *codec = dai->codec;
struct pcm1792a_private *priv = snd_soc_codec_get_drvdata(codec);
- int val = 0, ret;
+ int val = 0;
priv->rate = params_rate(params);
@@ -145,12 +140,8 @@ static int pcm1792a_hw_params(struct snd_pcm_substream *substream,
val = val << PCM1792A_FMT_SHIFT | PCM1792A_ATLD_ENABLE;
- ret = regmap_update_bits(priv->regmap, PCM1792A_FMT_CONTROL,
+ return regmap_update_bits(priv->regmap, PCM1792A_FMT_CONTROL,
PCM1792A_FMT_MASK | PCM1792A_ATLD_ENABLE, val);
- if (ret < 0)
- return ret;
-
- return 0;
}
static const struct snd_soc_dai_ops pcm1792a_dai_ops = {
--
2.1.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] sound: codecs: pcm1792a: clean function exit
2015-11-25 8:10 [PATCH v2] sound: codecs: pcm1792a: clean function exit Raphael Poggi
@ 2015-11-25 8:18 ` Michael Trimarchi
2015-12-14 11:48 ` Raphaël Poggi
0 siblings, 1 reply; 3+ messages in thread
From: Michael Trimarchi @ 2015-11-25 8:18 UTC (permalink / raw)
To: Raphael Poggi; +Cc: perex, tiwai, LKML, alsa-devel@alsa-project.org
Hi
On Wed, Nov 25, 2015 at 9:10 AM, Raphael Poggi <poggi.raph@gmail.com> wrote:
> Signed-off-by: Raphael Poggi <poggi.raph@gmail.com>
> ---
> sound/soc/codecs/pcm1792a.c | 15 +++------------
> 1 file changed, 3 insertions(+), 12 deletions(-)
>
> diff --git a/sound/soc/codecs/pcm1792a.c b/sound/soc/codecs/pcm1792a.c
> index 08bb486..27d54bc 100644
> --- a/sound/soc/codecs/pcm1792a.c
> +++ b/sound/soc/codecs/pcm1792a.c
> @@ -91,14 +91,9 @@ static int pcm1792a_digital_mute(struct snd_soc_dai *dai, int mute)
> {
> struct snd_soc_codec *codec = dai->codec;
> struct pcm1792a_private *priv = snd_soc_codec_get_drvdata(codec);
> - int ret;
>
> - ret = regmap_update_bits(priv->regmap, PCM1792A_SOFT_MUTE,
> + return regmap_update_bits(priv->regmap, PCM1792A_SOFT_MUTE,
> PCM1792A_MUTE_MASK, !!mute);
> - if (ret < 0)
> - return ret;
> -
> - return 0;
> }
>
> static int pcm1792a_hw_params(struct snd_pcm_substream *substream,
> @@ -107,7 +102,7 @@ static int pcm1792a_hw_params(struct snd_pcm_substream *substream,
> {
> struct snd_soc_codec *codec = dai->codec;
> struct pcm1792a_private *priv = snd_soc_codec_get_drvdata(codec);
> - int val = 0, ret;
> + int val = 0;
>
> priv->rate = params_rate(params);
>
> @@ -145,12 +140,8 @@ static int pcm1792a_hw_params(struct snd_pcm_substream *substream,
>
> val = val << PCM1792A_FMT_SHIFT | PCM1792A_ATLD_ENABLE;
>
> - ret = regmap_update_bits(priv->regmap, PCM1792A_FMT_CONTROL,
> + return regmap_update_bits(priv->regmap, PCM1792A_FMT_CONTROL,
> PCM1792A_FMT_MASK | PCM1792A_ATLD_ENABLE, val);
> - if (ret < 0)
> - return ret;
> -
> - return 0;
> }
>
> static const struct snd_soc_dai_ops pcm1792a_dai_ops = {
> --
> 2.1.0
>
It's fine for me
reviewed-by: Michael Trimarchi <michael@amarulasolutions.com>
--
| Michael Nazzareno Trimarchi Amarula Solutions BV |
| COO - Founder Cruquiuskade 47 |
| +31(0)851119172 Amsterdam 1018 AM NL |
| [`as] http://www.amarulasolutions.com |
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] sound: codecs: pcm1792a: clean function exit
2015-11-25 8:18 ` Michael Trimarchi
@ 2015-12-14 11:48 ` Raphaël Poggi
0 siblings, 0 replies; 3+ messages in thread
From: Raphaël Poggi @ 2015-12-14 11:48 UTC (permalink / raw)
To: perex, tiwai; +Cc: LKML, alsa-devel@alsa-project.org, Michael Trimarchi
ping ?
2015-11-25 9:18 GMT+01:00 Michael Trimarchi <michael@amarulasolutions.com>:
> Hi
>
> On Wed, Nov 25, 2015 at 9:10 AM, Raphael Poggi <poggi.raph@gmail.com> wrote:
>> Signed-off-by: Raphael Poggi <poggi.raph@gmail.com>
>> ---
>> sound/soc/codecs/pcm1792a.c | 15 +++------------
>> 1 file changed, 3 insertions(+), 12 deletions(-)
>>
>> diff --git a/sound/soc/codecs/pcm1792a.c b/sound/soc/codecs/pcm1792a.c
>> index 08bb486..27d54bc 100644
>> --- a/sound/soc/codecs/pcm1792a.c
>> +++ b/sound/soc/codecs/pcm1792a.c
>> @@ -91,14 +91,9 @@ static int pcm1792a_digital_mute(struct snd_soc_dai *dai, int mute)
>> {
>> struct snd_soc_codec *codec = dai->codec;
>> struct pcm1792a_private *priv = snd_soc_codec_get_drvdata(codec);
>> - int ret;
>>
>> - ret = regmap_update_bits(priv->regmap, PCM1792A_SOFT_MUTE,
>> + return regmap_update_bits(priv->regmap, PCM1792A_SOFT_MUTE,
>> PCM1792A_MUTE_MASK, !!mute);
>> - if (ret < 0)
>> - return ret;
>> -
>> - return 0;
>> }
>>
>> static int pcm1792a_hw_params(struct snd_pcm_substream *substream,
>> @@ -107,7 +102,7 @@ static int pcm1792a_hw_params(struct snd_pcm_substream *substream,
>> {
>> struct snd_soc_codec *codec = dai->codec;
>> struct pcm1792a_private *priv = snd_soc_codec_get_drvdata(codec);
>> - int val = 0, ret;
>> + int val = 0;
>>
>> priv->rate = params_rate(params);
>>
>> @@ -145,12 +140,8 @@ static int pcm1792a_hw_params(struct snd_pcm_substream *substream,
>>
>> val = val << PCM1792A_FMT_SHIFT | PCM1792A_ATLD_ENABLE;
>>
>> - ret = regmap_update_bits(priv->regmap, PCM1792A_FMT_CONTROL,
>> + return regmap_update_bits(priv->regmap, PCM1792A_FMT_CONTROL,
>> PCM1792A_FMT_MASK | PCM1792A_ATLD_ENABLE, val);
>> - if (ret < 0)
>> - return ret;
>> -
>> - return 0;
>> }
>>
>> static const struct snd_soc_dai_ops pcm1792a_dai_ops = {
>> --
>> 2.1.0
>>
>
> It's fine for me
>
> reviewed-by: Michael Trimarchi <michael@amarulasolutions.com>
>
>
> --
> | Michael Nazzareno Trimarchi Amarula Solutions BV |
> | COO - Founder Cruquiuskade 47 |
> | +31(0)851119172 Amsterdam 1018 AM NL |
> | [`as] http://www.amarulasolutions.com |
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-12-14 11:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-25 8:10 [PATCH v2] sound: codecs: pcm1792a: clean function exit Raphael Poggi
2015-11-25 8:18 ` Michael Trimarchi
2015-12-14 11:48 ` Raphaël Poggi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox