Re: [PATCH 1/2] gpio / ACPI: Avoid unnecessary checks in __gpiod_get_index()

2015-03-17 Thread Linus Walleij
On Tue, Mar 10, 2015 at 11:08 PM, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > If dev is NULL in __gpiod_get_index() and both ACPI and OF are > enabled, it will be checked twice before the code decides to give > up with DT/ACPI lookup, so avoid that. > > Also use the observation that

Re: [PATCH 1/2] gpio / ACPI: Avoid unnecessary checks in __gpiod_get_index()

2015-03-17 Thread Linus Walleij
On Tue, Mar 10, 2015 at 11:08 PM, Rafael J. Wysocki r...@rjwysocki.net wrote: From: Rafael J. Wysocki rafael.j.wyso...@intel.com If dev is NULL in __gpiod_get_index() and both ACPI and OF are enabled, it will be checked twice before the code decides to give up with DT/ACPI lookup, so avoid

Re: [PATCH 1/2] gpio / ACPI: Avoid unnecessary checks in __gpiod_get_index()

2015-03-11 Thread Mika Westerberg
On Tue, Mar 10, 2015 at 11:08:57PM +0100, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > If dev is NULL in __gpiod_get_index() and both ACPI and OF are > enabled, it will be checked twice before the code decides to give > up with DT/ACPI lookup, so avoid that. > > Also use the

Re: [PATCH 1/2] gpio / ACPI: Avoid unnecessary checks in __gpiod_get_index()

2015-03-11 Thread Mika Westerberg
On Tue, Mar 10, 2015 at 11:08:57PM +0100, Rafael J. Wysocki wrote: From: Rafael J. Wysocki rafael.j.wyso...@intel.com If dev is NULL in __gpiod_get_index() and both ACPI and OF are enabled, it will be checked twice before the code decides to give up with DT/ACPI lookup, so avoid that.

Re: [PATCH 1/2] gpio / ACPI: Avoid unnecessary checks in __gpiod_get_index()

2015-03-10 Thread Hanjun Guo
On 2015/3/11 6:08, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > If dev is NULL in __gpiod_get_index() and both ACPI and OF are > enabled, it will be checked twice before the code decides to give > up with DT/ACPI lookup, so avoid that. > > Also use the observation that ACPI_COMPANION()

[PATCH 1/2] gpio / ACPI: Avoid unnecessary checks in __gpiod_get_index()

2015-03-10 Thread Rafael J. Wysocki
From: Rafael J. Wysocki If dev is NULL in __gpiod_get_index() and both ACPI and OF are enabled, it will be checked twice before the code decides to give up with DT/ACPI lookup, so avoid that. Also use the observation that ACPI_COMPANION() is much more efficient than ACPI_HANDLE(), because the

Re: [PATCH 1/2] gpio / ACPI: Avoid unnecessary checks in __gpiod_get_index()

2015-03-10 Thread Hanjun Guo
On 2015/3/11 6:08, Rafael J. Wysocki wrote: From: Rafael J. Wysocki rafael.j.wyso...@intel.com If dev is NULL in __gpiod_get_index() and both ACPI and OF are enabled, it will be checked twice before the code decides to give up with DT/ACPI lookup, so avoid that. Also use the observation

[PATCH 1/2] gpio / ACPI: Avoid unnecessary checks in __gpiod_get_index()

2015-03-10 Thread Rafael J. Wysocki
From: Rafael J. Wysocki rafael.j.wyso...@intel.com If dev is NULL in __gpiod_get_index() and both ACPI and OF are enabled, it will be checked twice before the code decides to give up with DT/ACPI lookup, so avoid that. Also use the observation that ACPI_COMPANION() is much more efficient than