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 <[email protected]>
Cc: Alexandre Courbot <[email protected]>
Cc: [email protected]
Acked-by: Richard Cochran <[email protected]>
Acked-by: Krzysztof Halasa <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
This commit is contained in:
Linus Walleij 2013-09-10 13:15:18 +02:00
commit dc6ab07d8f

View file

@ -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);