All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jarkko Nikula <jarkko.nikula@linux.intel.com>
To: jianqun <xjq@rock-chips.com>,
	broonie@kernel.org, lgirdwood@gmail.com, perex@perex.cz,
	tiwai@suse.de, tbleung@chromium.org, dgreid@chromium.org,
	kevin.strasser@intel.com, swarren@nvidia.com,
	ralph.birt@maximintegrated.com
Cc: heiko@sntech.de, alsa-devel@alsa-project.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ASoC: max98090 not need to return fail if fail to request hpdet irq.
Date: Wed, 30 Jul 2014 09:29:27 +0300	[thread overview]
Message-ID: <53D890C7.4080201@linux.intel.com> (raw)
In-Reply-To: <1406685010-25108-1-git-send-email-xjq@rock-chips.com>

On 07/30/2014 04:50 AM, jianqun wrote:
> From: xujianqun <xjq@rock-chips.com>
>
> Since hardware may not MUST to use IRQ pin of max98090 as jack detect, the
> driver can work well without it, can report jack trigger to CPU by a GPIO.
>
> But here driver will register fail caused by failed to request irq.
>
> Signed-off-by: xujianqun <xjq@rock-chips.com>
> ---
>   sound/soc/codecs/max98090.c |    2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/sound/soc/codecs/max98090.c b/sound/soc/codecs/max98090.c
> index 566919c..bc124ff 100644
> --- a/sound/soc/codecs/max98090.c
> +++ b/sound/soc/codecs/max98090.c
> @@ -2515,6 +2515,8 @@ static int max98090_probe(struct snd_soc_codec *codec)
>   
>   	max98090_add_widgets(codec);
>   
> +	return 0;
> +
>   err_access:
>   	return ret;
>   }
I would say it's better to call request_threaded_irq() conditionally 
when max98090->irq is valid in the same max98090_probe(). Also code 
should return instantly in case of request_threaded_irq() fails for 
valid irq.

Now code is still printing needless error message in case max98090->irq 
is invalid or not specified and continue probing in case 
request_threaded_irq() fails for valid irq.

-- 
Jarkko

  reply	other threads:[~2014-07-30  6:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-30  1:50 [PATCH] ASoC: max98090 not need to return fail if fail to request hpdet irq jianqun
2014-07-30  6:29 ` Jarkko Nikula [this message]
2014-07-30  9:00   ` Jianqun
2014-07-30  8:54 ` [PATCH] ASoC: max98090 add irq valid check jianqun
2014-07-30 14:21   ` [alsa-devel] " Jarkko Nikula

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53D890C7.4080201@linux.intel.com \
    --to=jarkko.nikula@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=dgreid@chromium.org \
    --cc=heiko@sntech.de \
    --cc=kevin.strasser@intel.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=ralph.birt@maximintegrated.com \
    --cc=swarren@nvidia.com \
    --cc=tbleung@chromium.org \
    --cc=tiwai@suse.de \
    --cc=xjq@rock-chips.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.