lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACRpkdaQNjeL5sQNO24xPzR-PJk_emBmrUgx40x7fMP9oogqGQ@mail.gmail.com>
Date:	Wed, 24 Sep 2014 10:02:41 +0200
From:	Linus Walleij <linus.walleij@...aro.org>
To:	Mika Westerberg <mika.westerberg@...ux.intel.com>
Cc:	"Rafael J. Wysocki" <rjw@...ysocki.net>,
	ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Alexandre Courbot <gnurou@...il.com>,
	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	Bryan Wu <cooloney@...il.com>,
	Lee Jones <lee.jones@...aro.org>,
	Grant Likely <grant.likely@...aro.org>,
	Arnd Bergmann <arnd@...db.de>, Aaron Lu <aaron.lu@...el.com>,
	Darren Hart <dvhart@...ux.intel.com>
Subject: Re: [RFC PATCH v2 12/16] input: gpio_keys_polled - Add support for
 GPIO descriptors

On Tue, Sep 16, 2014 at 1:52 PM, Mika Westerberg
<mika.westerberg@...ux.intel.com> wrote:

> From: Aaron Lu <aaron.lu@...el.com>
>
> GPIO descriptors are the preferred way over legacy GPIO numbers
> nowadays. Convert the driver to use GPIO descriptors internally but
> still allow passing legacy GPIO numbers from platform data to support
> existing platforms.
>
> Signed-off-by: Aaron Lu <aaron.lu@...el.com>
> Signed-off-by: Mika Westerberg <mika.westerberg@...ux.intel.com>

Great!

>  #include <linux/gpio.h>
> +#include <linux/gpio/consumer.h>

Again <linux/gpio.h> should not be needed anymore.

> +               /*
> +                * Legacy GPIO number so request the GPIO here and
> +                * convert it to descriptor.
> +                */
> +               if (!button->gpiod && gpio_is_valid(button->gpio)) {
> +                       unsigned flags = 0;
> +
> +                       if (button->active_low)
> +                               flags |= GPIOF_ACTIVE_LOW;
> +
> +                       error = devm_gpio_request_one(&pdev->dev, button->gpio,
> +                                       flags, button->desc ? : DRV_NAME);
> +                       if (error) {
> +                               dev_err(dev, "unable to claim gpio %u, err=%d\n",
> +                                       button->gpio, error);
> +                               return error;
> +                       }
> +
> +                       button->gpiod = gpio_to_desc(button->gpio);

So the field button->gpio is still there, this is a bit disturbing, but when
I grep for it I see there is a multitude of users :-/

OK I guess these users have to be fixed one by one.

Reviewed-by: Linus Walleij <linus.walleij@...aro.org>

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ