lkml.org 
[lkml]   [2019]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3] driver core: platform: Add an error message to platform_get_irq*()
From
Date
Quoting Rafael J. Wysocki (2019-01-03 01:40:26)
> On Wed, Jan 2, 2019 at 7:51 PM Stephen Boyd <swboyd@chromium.org> wrote:
> > @@ -130,6 +125,22 @@ int platform_get_irq(struct platform_device *dev, unsigned int num)
> > return r ? r->start : -ENXIO;
> > #endif
> > }
> > +
> > +/**
> > + * platform_get_irq - get an IRQ for a device
> > + * @dev: platform device
> > + * @num: IRQ number index
> > + */
> > +int platform_get_irq(struct platform_device *dev, unsigned int num)
> > +{
> > + int ret;
> > +
> > + ret = __platform_get_irq(dev, num);
> > + if (ret < 0 && ret != -EPROBE_DEFER)
> > + dev_err(&dev->dev, "IRQ index %u not found\n", num);
>
> Why don't you log the error code too?
>

I don't see much benefit to seeing -ENXIO or -EINVAL printed here, so I
left out the error code.

\
 
 \ /
  Last update: 2019-01-03 17:13    [W:0.093 / U:0.024 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site