From: Linus Walleij Date: Tue, 10 Sep 2013 11:15:18 +0000 (+0200) Subject: ptp: switch to use gpiolib X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=dc6ab07d8f158b6c0a86fc412215692b28632c23;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Cc: Alexandre Courbot Cc: netdev@vger.kernel.org Acked-by: Richard Cochran Acked-by: Krzysztof Halasa Signed-off-by: Linus Walleij --- diff --git a/drivers/ptp/ptp_ixp46x.c b/drivers/ptp/ptp_ixp46x.c index d49b85164fd2..4a08727fcaf3 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);