From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Hans de Goede <hdegoede@redhat.com>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org
Subject: Re: [PATCH] Input: soc_button_array: Use NULL for GPIO connection ID
Date: Thu, 09 Mar 2017 16:11:15 +0200 [thread overview]
Message-ID: <1489068675.20145.171.camel@linux.intel.com> (raw)
In-Reply-To: <20170309135957.15161-1-hdegoede@redhat.com>
On Thu, 2017-03-09 at 14:59 +0100, Hans de Goede wrote:
> The gpiolib-acpi code is becoming more strict and connection-IDs
> may only be used with devices which have a _DSD with matching IDs
> in there. Since the soc_button_array ACPI binding is pure index
> based pass in NULL as connection-ID to avoid the more strict cheks
> resulting in gpiod_count and gpiod_get_index not returning any gpios.
>
Fine by me:
FWIW:
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
> drivers/input/misc/soc_button_array.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/input/misc/soc_button_array.c
> b/drivers/input/misc/soc_button_array.c
> index eb1ba4e..b8769f6 100644
> --- a/drivers/input/misc/soc_button_array.c
> +++ b/drivers/input/misc/soc_button_array.c
> @@ -48,7 +48,7 @@ static int soc_button_lookup_gpio(struct device
> *dev, int acpi_index)
> struct gpio_desc *desc;
> int gpio;
>
> - desc = gpiod_get_index(dev, KBUILD_MODNAME, acpi_index,
> GPIOD_ASIS);
> + desc = gpiod_get_index(dev, NULL, acpi_index, GPIOD_ASIS);
> if (IS_ERR(desc))
> return PTR_ERR(desc);
>
> @@ -167,7 +167,7 @@ static int soc_button_probe(struct platform_device
> *pdev)
>
> button_info = (struct soc_button_info *)id->driver_data;
>
> - if (gpiod_count(dev, KBUILD_MODNAME) <= 0) {
> + if (gpiod_count(dev, NULL) <= 0) {
> dev_dbg(dev, "no GPIO attached, ignoring...\n");
> return -ENODEV;
> }
--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy
next prev parent reply other threads:[~2017-03-09 14:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-09 13:59 [PATCH] Input: soc_button_array: Use NULL for GPIO connection ID Hans de Goede
2017-03-09 14:11 ` Andy Shevchenko [this message]
2017-03-09 17:59 ` Dmitry Torokhov
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=1489068675.20145.171.camel@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=dmitry.torokhov@gmail.com \
--cc=hdegoede@redhat.com \
--cc=linux-input@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.