Message ID | 1556119724-9873-1-git-send-email-fabien.dessenne@st.com (mailing list archive) |
---|---|
State | Mainlined, archived |
Commit | 0bbf4084e0cfbbbff8673f3b9867778d5d4b1d6f |
Headers | show |
Series | ASoC: stm32: i2s: return the get_irq error | expand |
On 4/24/19 5:28 PM, Fabien Dessenne wrote: > During probe, return the "get_irq" error value instead of -ENOENT. This > allows the driver to be deferred probed if needed. > > Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com> Acked-by: Olivier Moysan <olivier.moysan@st.com> > --- > sound/soc/stm/stm32_i2s.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/sound/soc/stm/stm32_i2s.c b/sound/soc/stm/stm32_i2s.c > index 9526342..97d5e99 100644 > --- a/sound/soc/stm/stm32_i2s.c > +++ b/sound/soc/stm/stm32_i2s.c > @@ -838,8 +838,9 @@ static int stm32_i2s_parse_dt(struct platform_device *pdev, > /* Get irqs */ > irq = platform_get_irq(pdev, 0); > if (irq < 0) { > - dev_err(&pdev->dev, "no irq for node %s\n", pdev->name); > - return -ENOENT; > + if (irq != -EPROBE_DEFER) > + dev_err(&pdev->dev, "no irq for node %s\n", pdev->name); > + return irq; > } > > ret = devm_request_irq(&pdev->dev, irq, stm32_i2s_isr, IRQF_ONESHOT, >
diff --git a/sound/soc/stm/stm32_i2s.c b/sound/soc/stm/stm32_i2s.c index 9526342..97d5e99 100644 --- a/sound/soc/stm/stm32_i2s.c +++ b/sound/soc/stm/stm32_i2s.c @@ -838,8 +838,9 @@ static int stm32_i2s_parse_dt(struct platform_device *pdev, /* Get irqs */ irq = platform_get_irq(pdev, 0); if (irq < 0) { - dev_err(&pdev->dev, "no irq for node %s\n", pdev->name); - return -ENOENT; + if (irq != -EPROBE_DEFER) + dev_err(&pdev->dev, "no irq for node %s\n", pdev->name); + return irq; } ret = devm_request_irq(&pdev->dev, irq, stm32_i2s_isr, IRQF_ONESHOT,
During probe, return the "get_irq" error value instead of -ENOENT. This allows the driver to be deferred probed if needed. Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com> --- sound/soc/stm/stm32_i2s.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)