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]
Date:	Thu, 12 Jul 2012 00:11:39 +0200
From:	Linus Walleij <linus.walleij@...aro.org>
To:	Chandrabhanu Mahapatra <cmahapatra@...com>
Cc:	grant.likely@...retlab.ca, linus.walleij@...ricsson.com,
	rob.herring@...xeda.com, linux-kernel@...r.kernel.org,
	devicetree-discuss@...ts.ozlabs.org, leed.aguilar@...com
Subject: Re: [PATCH 4/4] gpio/pca953x: register the device irq using
 appropriate api's

On Tue, Jul 10, 2012 at 3:36 PM, Chandrabhanu Mahapatra
<cmahapatra@...com> wrote:

> From: Leed Aguilar <leed.aguilar@...com>
>
> Here, the implementation of registration of requested IRQs has been corrected
> with appropiate api's. The gpio number is requested through gpio_request_one()
> API and conversion of the gpio to irq is done using the gpio_to_irq() API.
>
> Change-Id: I964145e2a280d6553ea2c05ea8049810a1983930

Delete that.

> Signed-off-by: Leed Aguilar <leed.aguilar@...com>
> Signed-off-by: Chandrabhanu Mahapatra <cmahapatra@...com>
> ---
>  drivers/gpio/gpio-pca953x.c |    8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c
> index c3ca7d8..27486da 100644
> --- a/drivers/gpio/gpio-pca953x.c
> +++ b/drivers/gpio/gpio-pca953x.c
> @@ -509,7 +509,13 @@ static int pca953x_irq_setup(struct pca953x_chip *chip,
>  #endif
>                 }
>
> -               ret = request_threaded_irq(client->irq,
> +               ret = gpio_request_one(client->irq, GPIOF_IN, "pca953x");

Not that it's really related to this one patch, but why is a GPIO number named
"irq" in client->irq??

> +               if (ret) {
> +                       dev_err(&client->dev, "gpio request failure\n");
> +                       goto out_failed;
> +               }
> +
> +               ret = request_threaded_irq(gpio_to_irq(client->irq),

It gets ever more confused as you're seemingly converting an IRQ to
an IRQ. Can we rename this variable in a separate patch?

Apart from this it looks good, but do I dare apply it without applying
3/4 (that needs ACK:ing)?

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