aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ptp/ptp_ixp46x.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2013-09-10 07:15:18 -0400
committerLinus Walleij <linus.walleij@linaro.org>2013-09-27 08:15:27 -0400
commitdc6ab07d8f158b6c0a86fc412215692b28632c23 (patch)
tree5a57d89fa0db3cffd2f14cc491619091e391e41f /drivers/ptp/ptp_ixp46x.c
parentb22973d0ecfcf499179870599b0f6e0712ff0a14 (diff)
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@openwrt.org> Cc: Alexandre Courbot <acourbot@nvidia.com> Cc: netdev@vger.kernel.org Acked-by: Richard Cochran <richardcochran@gmail.com> Acked-by: Krzysztof Halasa <khc@pm.waw.pl> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/ptp/ptp_ixp46x.c')
-rw-r--r--drivers/ptp/ptp_ixp46x.c9
1 files changed, 8 insertions, 1 deletions
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;
259static int setup_interrupt(int gpio) 259static int setup_interrupt(int gpio)
260{ 260{
261 int irq; 261 int irq;
262 int err;
262 263
263 gpio_line_config(gpio, IXP4XX_GPIO_IN); 264 err = gpio_request(gpio, "ixp4-ptp");
265 if (err)
266 return err;
267
268 err = gpio_direction_input(gpio);
269 if (err)
270 return err;
264 271
265 irq = gpio_to_irq(gpio); 272 irq = gpio_to_irq(gpio);
266 273