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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200906151629.11350.david-b@pacbell.net>
Date:	Mon, 15 Jun 2009 16:29:11 -0700
From:	David Brownell <david-b@...bell.net>
To:	Baruch Siach <baruch@...s.co.il>
Cc:	linux-kernel@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-arm-kernel@...ts.arm.linux.org.uk,
	"Russell King - ARM Linux" <linux@....linux.org.uk>
Subject: Re: [PATCH v5] gpio: driver for PrimeCell PL061 GPIO controller

On Thursday 11 June 2009, Baruch Siach wrote:
> +static unsigned int pl061_irq_startup(unsigned irq)
> +{
> +       if (gpio_request(irq_to_gpio(irq), "IRQ") == 0)
> +               pr_warning("%s: warning: GPIO%d has not been requested\n",
> +                               __func__, irq_to_gpio(irq));

No, that's the responsibility of whoever is setting this up.

Normally, platform setup code would request the GPIO since it's
being dedicated to some task on the board ... and then pass the
gpio_to_irq() value as a device resource, or maybe the GPIO itself
(if the driver had to deal with GPIOs per se).

Also, irq_to_gpio() can be problematic in some systems; avoid it.


> +
> +       pl061_irq_enable(irq);
> +
> +       return 0;
> +}

Remove that gpio_request(), and the irq_to_gpio(), and you get:

Acked-by: David Brownell <dbrownell@...rs.sourceforge.net>

The driver is a trifle unusual in having only eight bits per bank,
but that's just hardware.  Software looks clean, thanks.


--
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