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
| ||
|
Date: Tue, 10 Sep 2013 14:31:00 +0200 From: Linus Walleij <linus.walleij@...aro.org> To: linux-gpio@...r.kernel.org, Imre Kaloz <kaloz@...nwrt.org>, Krzysztof Halasa <khc@...waw.pl>, Richard Cochran <richardcochran@...il.com> Cc: Alexandre Courbot <acourbot@...dia.com>, linux-arm-kernel@...ts.infradead.org, Linus Walleij <linus.walleij@...aro.org>, netdev@...r.kernel.org Subject: [PATCH 4/7] ptp: switch to use gpiolib This platform supports gpiolib, so remove the custom API use and replace with calls to gpiolib. Also request the GPIO before starting to use it. Cc: Imre Kaloz <kaloz@...nwrt.org> Cc: Krzysztof Halasa <khc@...waw.pl> Cc: Alexandre Courbot <acourbot@...dia.com> Cc: Richard Cochran <richardcochran@...il.com> Cc: netdev@...r.kernel.org Signed-off-by: Linus Walleij <linus.walleij@...aro.org> --- Hi Richard, I'm seeking an ACK on this patch to take it throug the GPIO tree as part of a clean-out of custom GPIO implementations. --- drivers/ptp/ptp_ixp46x.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/ptp/ptp_ixp46x.c b/drivers/ptp/ptp_ixp46x.c index d49b851..4a08727 100644 --- a/drivers/ptp/ptp_ixp46x.c +++ b/drivers/ptp/ptp_ixp46x.c @@ -259,8 +259,15 @@ static struct ixp_clock ixp_clock; static int setup_interrupt(int gpio) { int irq; + int err; - gpio_line_config(gpio, IXP4XX_GPIO_IN); + err = gpio_request(gpio, "ixp4-ptp"); + if (err) + return err; + + err = gpio_direction_input(gpio); + if (err) + return err; irq = gpio_to_irq(gpio); -- 1.8.3.1 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists