Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1612148

Re: [PATCH] ACPI / gpio: do not fall back to parsing _CRS when we get a deferral

From Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH] ACPI / gpio: do not fall back to parsing _CRS when we get a deferral
Date 2017-03-29 18:50 +0200
Message-ID <tqoXf-188-7@gated-at.bofh.it> (permalink)
References <tohwR-7sz-3@gated-at.bofh.it> <tq0UX-12M-45@gated-at.bofh.it> <tqoNA-14j-9@gated-at.bofh.it>
Organization Intel Finland Oy

Show all headers | View raw


On Wed, 2017-03-29 at 18:33 +0200, Hans de Goede wrote:
> HI,
> 
> On 28-03-17 17:04, Andy Shevchenko wrote:
> > On Thu, 2017-03-23 at 13:21 -0700, Dmitry Torokhov wrote:
> > > If, while locating GPIOs by name, we get probe deferral, we should
> > > immediately report it to caller rather than trying to fall back to
> > > parsing
> > > unnamed GPIOs from _CRS block.
> > 
> > +Cc: Hans.
> > 
> > Hans, do have any objections on this? Would you ideally give your
> > Tested-by?
> 
> Looks good to me and also does not seem to break anything on my test
> devices, so:
> 
> Acked-and-Tested-by: Hans de Goede <hdegoede@redhat.com>

Thanks!

Linus, I'm fully satisfied :-)

> 
> Regards,
> 
> Hans
> 
> 
> > 
> > > 
> > > Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> > > ---
> > >  drivers/gpio/gpiolib-acpi.c | 4 +++-
> > >  1 file changed, 3 insertions(+), 1 deletion(-)
> > > 
> > > diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-
> > > acpi.c
> > > index a3faefa44f68..d3f9f028a37b 100644
> > > --- a/drivers/gpio/gpiolib-acpi.c
> > > +++ b/drivers/gpio/gpiolib-acpi.c
> > > @@ -572,8 +572,10 @@ struct gpio_desc *acpi_find_gpio(struct
> > > device
> > > *dev,
> > >  		}
> > > 
> > >  		desc = acpi_get_gpiod_by_index(adev, propname,
> > > idx,
> > > &info);
> > > -		if (!IS_ERR(desc) || (PTR_ERR(desc) ==
> > > -EPROBE_DEFER))
> > > +		if (!IS_ERR(desc))
> > >  			break;
> > > +		if (PTR_ERR(desc) == -EPROBE_DEFER)
> > > +			return ERR_CAST(desc);
> > >  	}
> > > 
> > >  	/* Then from plain _CRS GPIOs */
> > > --
> > > 2.12.1.500.gab5fba24ee-goog
> > > 
> > > 

-- 
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [PATCH] ACPI / gpio: do not fall back to parsing _CRS when we  get a deferral Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-03-28 17:10 +0200
  Re: [PATCH] ACPI / gpio: do not fall back to parsing _CRS when we get  a deferral Hans de Goede <hdegoede@redhat.com> - 2017-03-29 18:40 +0200
    Re: [PATCH] ACPI / gpio: do not fall back to parsing _CRS when we  get a deferral Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-03-29 18:50 +0200

csiph-web