From aae6da6d5f09307b1feb391a47d1ddb6bf2d523e Mon Sep 17 00:00:00 2001 From: Jarkko Nikula Date: Fri, 31 Oct 2008 14:18:54 +0200 Subject: [PATCH] CBUS: Switch to gpio_request/free calls Signed-off-by: Jarkko Nikula Signed-off-by: Tony Lindgren --- drivers/cbus/cbus.c | 12 ++++++------ drivers/cbus/retu.c | 10 +++++----- drivers/cbus/tahvo.c | 10 +++++----- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/cbus/cbus.c b/drivers/cbus/cbus.c index c0401208239..774acceb140 100644 --- a/drivers/cbus/cbus.c +++ b/drivers/cbus/cbus.c @@ -28,8 +28,8 @@ #include #include #include +#include -#include #include #include @@ -254,13 +254,13 @@ int __init cbus_bus_init(void) } #endif - if ((ret = omap_request_gpio(chost->clk_gpio)) < 0) + if ((ret = gpio_request(chost->clk_gpio, "CBUS clk")) < 0) goto exit1; - if ((ret = omap_request_gpio(chost->dat_gpio)) < 0) + if ((ret = gpio_request(chost->dat_gpio, "CBUS data")) < 0) goto exit2; - if ((ret = omap_request_gpio(chost->sel_gpio)) < 0) + if ((ret = gpio_request(chost->sel_gpio, "CBUS sel")) < 0) goto exit3; gpio_direction_output(chost->clk_gpio, 0); @@ -274,9 +274,9 @@ int __init cbus_bus_init(void) return 0; exit3: - omap_free_gpio(chost->dat_gpio); + gpio_free(chost->dat_gpio); exit2: - omap_free_gpio(chost->clk_gpio); + gpio_free(chost->clk_gpio); exit1: kfree(chost); return ret; diff --git a/drivers/cbus/retu.c b/drivers/cbus/retu.c index bf88d92b8e8..84d784065c7 100644 --- a/drivers/cbus/retu.c +++ b/drivers/cbus/retu.c @@ -35,11 +35,11 @@ #include #include #include +#include #include #include -#include #include #include @@ -336,7 +336,7 @@ static int __devinit retu_probe(struct device *dev) retu_irq_pin = em_asic_config->retu_irq_gpio; - if ((ret = omap_request_gpio(retu_irq_pin)) < 0) { + if ((ret = gpio_request(retu_irq_pin, "RETU irq")) < 0) { printk(KERN_ERR PFX "Unable to reserve IRQ GPIO\n"); return ret; } @@ -363,7 +363,7 @@ static int __devinit retu_probe(struct device *dev) "retu", 0); if (ret < 0) { printk(KERN_ERR PFX "Unable to register IRQ handler\n"); - omap_free_gpio(retu_irq_pin); + gpio_free(retu_irq_pin); return ret; } set_irq_wake(gpio_to_irq(retu_irq_pin), 1); @@ -376,7 +376,7 @@ static int __devinit retu_probe(struct device *dev) if (retu_user_init() < 0) { printk(KERN_ERR "Unable to initialize driver\n"); free_irq(gpio_to_irq(retu_irq_pin), 0); - omap_free_gpio(retu_irq_pin); + gpio_free(retu_irq_pin); return ret; } #endif @@ -392,7 +392,7 @@ static int retu_remove(struct device *dev) /* Mask all RETU interrupts */ retu_write_reg(RETU_REG_IMR, 0xffff); free_irq(gpio_to_irq(retu_irq_pin), 0); - omap_free_gpio(retu_irq_pin); + gpio_free(retu_irq_pin); tasklet_kill(&retu_tasklet); return 0; diff --git a/drivers/cbus/tahvo.c b/drivers/cbus/tahvo.c index 2321dd33459..e734c4c4905 100644 --- a/drivers/cbus/tahvo.c +++ b/drivers/cbus/tahvo.c @@ -35,11 +35,11 @@ #include #include #include +#include #include #include -#include #include #include @@ -323,7 +323,7 @@ static int __devinit tahvo_probe(struct device *dev) tahvo_irq_pin = em_asic_config->tahvo_irq_gpio; - if ((ret = omap_request_gpio(tahvo_irq_pin)) < 0) { + if ((ret = gpio_request(tahvo_irq_pin, "TAHVO irq")) < 0) { printk(KERN_ERR PFX "Unable to reserve IRQ GPIO\n"); return ret; } @@ -341,7 +341,7 @@ static int __devinit tahvo_probe(struct device *dev) "tahvo", 0); if (ret < 0) { printk(KERN_ERR PFX "Unable to register IRQ handler\n"); - omap_free_gpio(tahvo_irq_pin); + gpio_free(tahvo_irq_pin); return ret; } #ifdef CONFIG_CBUS_TAHVO_USER @@ -349,7 +349,7 @@ static int __devinit tahvo_probe(struct device *dev) if (tahvo_user_init() < 0) { printk(KERN_ERR "Unable to initialize driver\n"); free_irq(gpio_to_irq(tahvo_irq_pin), 0); - omap_free_gpio(tahvo_irq_pin); + gpio_free(tahvo_irq_pin); return ret; } #endif @@ -364,7 +364,7 @@ static int tahvo_remove(struct device *dev) /* Mask all TAHVO interrupts */ tahvo_write_reg(TAHVO_REG_IMR, 0xffff); free_irq(gpio_to_irq(tahvo_irq_pin), 0); - omap_free_gpio(tahvo_irq_pin); + gpio_free(tahvo_irq_pin); tasklet_kill(&tahvo_tasklet); return 0; -- 2.41.1