linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Amelie DELAUNAY <amelie.delaunay@st.com>
To: Fabien DESSENNE <fabien.dessenne@st.com>,
	Mark Brown <broonie@kernel.org>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Alexandre TORGUE <alexandre.torgue@st.com>,
	"linux-spi@vger.kernel.org" <linux-spi@vger.kernel.org>,
	"linux-stm32@st-md-mailman.stormreply.com"
	<linux-stm32@st-md-mailman.stormreply.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] spi: stm32: return the get_irq error
Date: Wed, 24 Apr 2019 14:52:16 +0000	[thread overview]
Message-ID: <6c11793b-bcfc-e069-56db-7e963d22dc6e@st.com> (raw)
In-Reply-To: <1556109524-21874-1-git-send-email-fabien.dessenne@st.com>

On 4/24/19 2:38 PM, Fabien Dessenne wrote:
> During probe, return the "get_irq" error value instead of -ENOENT. This
> allows the driver to be defer probed if needed.
> 
> Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com>

Acked-by: Amelie Delaunay <amelie.delaunay@st.com>

> ---
>   drivers/spi/spi-stm32.c | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/spi/spi-stm32.c b/drivers/spi/spi-stm32.c
> index 4186ed2..b222ce8 100644
> --- a/drivers/spi/spi-stm32.c
> +++ b/drivers/spi/spi-stm32.c
> @@ -1839,8 +1839,9 @@ static int stm32_spi_probe(struct platform_device *pdev)
>   
>   	spi->irq = platform_get_irq(pdev, 0);
>   	if (spi->irq <= 0) {
> -		dev_err(&pdev->dev, "no irq: %d\n", spi->irq);
> -		ret = -ENOENT;
> +		ret = spi->irq;
> +		if (ret != -EPROBE_DEFER)
> +			dev_err(&pdev->dev, "failed to get irq: %d\n", ret);
>   		goto err_master_put;
>   	}
>   	ret = devm_request_threaded_irq(&pdev->dev, spi->irq,
> 

  reply	other threads:[~2019-04-24 14:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-24 12:38 [PATCH] spi: stm32: return the get_irq error Fabien Dessenne
2019-04-24 14:52 ` Amelie DELAUNAY [this message]
2019-04-25 19:24 ` Applied "spi: stm32: return the get_irq error" to the spi tree Mark Brown
2019-04-25 19:26 ` Mark Brown
2019-05-02  2:18 ` Mark Brown

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=6c11793b-bcfc-e069-56db-7e963d22dc6e@st.com \
    --to=amelie.delaunay@st.com \
    --cc=alexandre.torgue@st.com \
    --cc=broonie@kernel.org \
    --cc=fabien.dessenne@st.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mcoquelin.stm32@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).