gpio: Cleanup genirq namespace
authorThomas Gleixner <tglx@linutronix.de>
Thu, 24 Mar 2011 21:27:36 +0000 (21:27 +0000)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 24 Mar 2011 23:02:51 +0000 (00:02 +0100)
Converted with coccinelle.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
LKML-Reference: <20110324212509.025730689@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
drivers/gpio/adp5588-gpio.c
drivers/gpio/max732x.c
drivers/gpio/pca953x.c
drivers/gpio/pl061.c
drivers/gpio/stmpe-gpio.c
drivers/gpio/sx150x.c
drivers/gpio/tc3589x-gpio.c
drivers/gpio/timbgpio.c
drivers/gpio/vr41xx_giu.c

index 33fc685cb3852bb311608b364717e5cb34fdb29f..3525ad91877162aefb6cacc5bcd0963f3156aee7 100644 (file)
@@ -289,10 +289,10 @@ static int adp5588_irq_setup(struct adp5588_gpio *dev)
 
        for (gpio = 0; gpio < dev->gpio_chip.ngpio; gpio++) {
                int irq = gpio + dev->irq_base;
-               set_irq_chip_data(irq, dev);
-               set_irq_chip_and_handler(irq, &adp5588_irq_chip,
+               irq_set_chip_data(irq, dev);
+               irq_set_chip_and_handler(irq, &adp5588_irq_chip,
                                         handle_level_irq);
-               set_irq_nested_thread(irq, 1);
+               irq_set_nested_thread(irq, 1);
 #ifdef CONFIG_ARM
                /*
                 * ARM needs us to explicitly flag the IRQ as VALID,
@@ -300,7 +300,7 @@ static int adp5588_irq_setup(struct adp5588_gpio *dev)
                 */
                set_irq_flags(irq, IRQF_VALID);
 #else
-               set_irq_noprobe(irq);
+               irq_set_noprobe(irq);
 #endif
        }
 
index 9e1d01f0071ac14374c693418b92e21278778b8c..ad6951edc16c49c468f810cf9c251e5509926c45 100644 (file)
@@ -470,14 +470,14 @@ static int max732x_irq_setup(struct max732x_chip *chip,
                        if (!(chip->dir_input & (1 << lvl)))
                                continue;
 
-                       set_irq_chip_data(irq, chip);
-                       set_irq_chip_and_handler(irq, &max732x_irq_chip,
+                       irq_set_chip_data(irq, chip);
+                       irq_set_chip_and_handler(irq, &max732x_irq_chip,
                                                 handle_edge_irq);
-                       set_irq_nested_thread(irq, 1);
+                       irq_set_nested_thread(irq, 1);
 #ifdef CONFIG_ARM
                        set_irq_flags(irq, IRQF_VALID);
 #else
-                       set_irq_noprobe(irq);
+                       irq_set_noprobe(irq);
 #endif
                }
 
index 2fc25dec7cf5371ccd1a405fae65d622af5352e8..583e92592073647481d52acf81cd1a520d0e9d85 100644 (file)
@@ -395,13 +395,13 @@ static int pca953x_irq_setup(struct pca953x_chip *chip,
                for (lvl = 0; lvl < chip->gpio_chip.ngpio; lvl++) {
                        int irq = lvl + chip->irq_base;
 
-                       set_irq_chip_data(irq, chip);
-                       set_irq_chip_and_handler(irq, &pca953x_irq_chip,
+                       irq_set_chip_data(irq, chip);
+                       irq_set_chip_and_handler(irq, &pca953x_irq_chip,
                                                 handle_edge_irq);
 #ifdef CONFIG_ARM
                        set_irq_flags(irq, IRQF_VALID);
 #else
-                       set_irq_noprobe(irq);
+                       irq_set_noprobe(irq);
 #endif
                }
 
index 838ddbdf90cc22fe0a69ec7b84153f52cdaf4baf..901e4e06b377f487128f9fc06e26395988fb1226 100644 (file)
@@ -210,7 +210,7 @@ static struct irq_chip pl061_irqchip = {
 
 static void pl061_irq_handler(unsigned irq, struct irq_desc *desc)
 {
-       struct list_head *chip_list = get_irq_data(irq);
+       struct list_head *chip_list = irq_get_handler_data(irq);
        struct list_head *ptr;
        struct pl061_gpio *chip;
 
@@ -294,7 +294,7 @@ static int pl061_probe(struct amba_device *dev, const struct amba_id *id)
                ret = -ENODEV;
                goto iounmap;
        }
-       set_irq_chained_handler(irq, pl061_irq_handler);
+       irq_set_chained_handler(irq, pl061_irq_handler);
        if (!test_and_set_bit(irq, init_irq)) { /* list initialized? */
                chip_list = kmalloc(sizeof(*chip_list), GFP_KERNEL);
                if (chip_list == NULL) {
@@ -303,9 +303,9 @@ static int pl061_probe(struct amba_device *dev, const struct amba_id *id)
                        goto iounmap;
                }
                INIT_LIST_HEAD(chip_list);
-               set_irq_data(irq, chip_list);
+               irq_set_handler_data(irq, chip_list);
        } else
-               chip_list = get_irq_data(irq);
+               chip_list = irq_get_handler_data(irq);
        list_add(&chip->list, chip_list);
 
        for (i = 0; i < PL061_GPIO_NR; i++) {
@@ -315,10 +315,10 @@ static int pl061_probe(struct amba_device *dev, const struct amba_id *id)
                else
                        pl061_direction_input(&chip->gc, i);
 
-               set_irq_chip(i+chip->irq_base, &pl061_irqchip);
-               set_irq_handler(i+chip->irq_base, handle_simple_irq);
+               irq_set_chip(i + chip->irq_base, &pl061_irqchip);
+               irq_set_handler(i + chip->irq_base, handle_simple_irq);
                set_irq_flags(i+chip->irq_base, IRQF_VALID);
-               set_irq_chip_data(i+chip->irq_base, chip);
+               irq_set_chip_data(i + chip->irq_base, chip);
        }
 
        return 0;
index eb2901f8ab5ef6706d4705bb761cea30e129301b..4c980b573328eaeb4432504284ffe249fdb66a45 100644 (file)
@@ -254,14 +254,14 @@ static int __devinit stmpe_gpio_irq_init(struct stmpe_gpio *stmpe_gpio)
        int irq;
 
        for (irq = base; irq < base + stmpe_gpio->chip.ngpio; irq++) {
-               set_irq_chip_data(irq, stmpe_gpio);
-               set_irq_chip_and_handler(irq, &stmpe_gpio_irq_chip,
+               irq_set_chip_data(irq, stmpe_gpio);
+               irq_set_chip_and_handler(irq, &stmpe_gpio_irq_chip,
                                         handle_simple_irq);
-               set_irq_nested_thread(irq, 1);
+               irq_set_nested_thread(irq, 1);
 #ifdef CONFIG_ARM
                set_irq_flags(irq, IRQF_VALID);
 #else
-               set_irq_noprobe(irq);
+               irq_set_noprobe(irq);
 #endif
        }
 
@@ -277,8 +277,8 @@ static void stmpe_gpio_irq_remove(struct stmpe_gpio *stmpe_gpio)
 #ifdef CONFIG_ARM
                set_irq_flags(irq, 0);
 #endif
-               set_irq_chip_and_handler(irq, NULL, NULL);
-               set_irq_chip_data(irq, NULL);
+               irq_set_chip_and_handler(irq, NULL, NULL);
+               irq_set_chip_data(irq, NULL);
        }
 }
 
index d2f874c3d3d59ff3f8c095ca5d93a33c769131fe..0370ecf63edfcd3b1afbb0d4a6d9155b92e48a04 100644 (file)
@@ -551,12 +551,12 @@ static int sx150x_install_irq_chip(struct sx150x_chip *chip,
 
        for (n = 0; n < chip->dev_cfg->ngpios; ++n) {
                irq = irq_base + n;
-               set_irq_chip_and_handler(irq, &chip->irq_chip, handle_edge_irq);
-               set_irq_nested_thread(irq, 1);
+               irq_set_chip_and_handler(irq, &chip->irq_chip, handle_edge_irq);
+               irq_set_nested_thread(irq, 1);
 #ifdef CONFIG_ARM
                set_irq_flags(irq, IRQF_VALID);
 #else
-               set_irq_noprobe(irq);
+               irq_set_noprobe(irq);
 #endif
        }
 
@@ -583,8 +583,8 @@ static void sx150x_remove_irq_chip(struct sx150x_chip *chip)
 
        for (n = 0; n < chip->dev_cfg->ngpios; ++n) {
                irq = chip->irq_base + n;
-               set_irq_handler(irq, NULL);
-               set_irq_chip(irq, NULL);
+               irq_set_handler(irq, NULL);
+               irq_set_chip(irq, NULL);
        }
 }
 
index 27200af1a595d731d6dc7f2b4d1803660baff9ad..2a82e8999a4299553a4ebeec273a69b55663df61 100644 (file)
@@ -239,14 +239,14 @@ static int tc3589x_gpio_irq_init(struct tc3589x_gpio *tc3589x_gpio)
        int irq;
 
        for (irq = base; irq < base + tc3589x_gpio->chip.ngpio; irq++) {
-               set_irq_chip_data(irq, tc3589x_gpio);
-               set_irq_chip_and_handler(irq, &tc3589x_gpio_irq_chip,
+               irq_set_chip_data(irq, tc3589x_gpio);
+               irq_set_chip_and_handler(irq, &tc3589x_gpio_irq_chip,
                                         handle_simple_irq);
-               set_irq_nested_thread(irq, 1);
+               irq_set_nested_thread(irq, 1);
 #ifdef CONFIG_ARM
                set_irq_flags(irq, IRQF_VALID);
 #else
-               set_irq_noprobe(irq);
+               irq_set_noprobe(irq);
 #endif
        }
 
@@ -262,8 +262,8 @@ static void tc3589x_gpio_irq_remove(struct tc3589x_gpio *tc3589x_gpio)
 #ifdef CONFIG_ARM
                set_irq_flags(irq, 0);
 #endif
-               set_irq_chip_and_handler(irq, NULL, NULL);
-               set_irq_chip_data(irq, NULL);
+               irq_set_chip_and_handler(irq, NULL, NULL);
+               irq_set_chip_data(irq, NULL);
        }
 }
 
index 58c8f30352dddbd4eda7b3cd2ac45455b51d92a4..0265872e57d15e666b1365b2954befb9e98bf59b 100644 (file)
@@ -195,7 +195,7 @@ out:
 
 static void timbgpio_irq(unsigned int irq, struct irq_desc *desc)
 {
-       struct timbgpio *tgpio = get_irq_data(irq);
+       struct timbgpio *tgpio = irq_get_handler_data(irq);
        unsigned long ipr;
        int offset;
 
@@ -291,16 +291,16 @@ static int __devinit timbgpio_probe(struct platform_device *pdev)
                return 0;
 
        for (i = 0; i < pdata->nr_pins; i++) {
-               set_irq_chip_and_handler_name(tgpio->irq_base + i,
+               irq_set_chip_and_handler_name(tgpio->irq_base + i,
                        &timbgpio_irqchip, handle_simple_irq, "mux");
-               set_irq_chip_data(tgpio->irq_base + i, tgpio);
+               irq_set_chip_data(tgpio->irq_base + i, tgpio);
 #ifdef CONFIG_ARM
                set_irq_flags(tgpio->irq_base + i, IRQF_VALID | IRQF_PROBE);
 #endif
        }
 
-       set_irq_data(irq, tgpio);
-       set_irq_chained_handler(irq, timbgpio_irq);
+       irq_set_handler_data(irq, tgpio);
+       irq_set_chained_handler(irq, timbgpio_irq);
 
        return 0;
 
@@ -327,12 +327,12 @@ static int __devexit timbgpio_remove(struct platform_device *pdev)
        if (irq >= 0 && tgpio->irq_base > 0) {
                int i;
                for (i = 0; i < pdata->nr_pins; i++) {
-                       set_irq_chip(tgpio->irq_base + i, NULL);
-                       set_irq_chip_data(tgpio->irq_base + i, NULL);
+                       irq_set_chip(tgpio->irq_base + i, NULL);
+                       irq_set_chip_data(tgpio->irq_base + i, NULL);
                }
 
-               set_irq_handler(irq, NULL);
-               set_irq_data(irq, NULL);
+               irq_set_handler(irq, NULL);
+               irq_set_handler_data(irq, NULL);
        }
 
        err = gpiochip_remove(&tgpio->gpio);
index cffa3bd7ad3bcb52fbc6328c5dcff3080a3c31ec..a365be040b3663be0f8eaf1baf4fac6b935bfcb6 100644 (file)
@@ -238,13 +238,13 @@ void vr41xx_set_irq_trigger(unsigned int pin, irq_trigger_t trigger,
                                        break;
                                }
                        }
-                       set_irq_chip_and_handler(GIU_IRQ(pin),
+                       irq_set_chip_and_handler(GIU_IRQ(pin),
                                                 &giuint_low_irq_chip,
                                                 handle_edge_irq);
                } else {
                        giu_clear(GIUINTTYPL, mask);
                        giu_clear(GIUINTHTSELL, mask);
-                       set_irq_chip_and_handler(GIU_IRQ(pin),
+                       irq_set_chip_and_handler(GIU_IRQ(pin),
                                                 &giuint_low_irq_chip,
                                                 handle_level_irq);
                }
@@ -273,13 +273,13 @@ void vr41xx_set_irq_trigger(unsigned int pin, irq_trigger_t trigger,
                                        break;
                                }
                        }
-                       set_irq_chip_and_handler(GIU_IRQ(pin),
+                       irq_set_chip_and_handler(GIU_IRQ(pin),
                                                 &giuint_high_irq_chip,
                                                 handle_edge_irq);
                } else {
                        giu_clear(GIUINTTYPH, mask);
                        giu_clear(GIUINTHTSELH, mask);
-                       set_irq_chip_and_handler(GIU_IRQ(pin),
+                       irq_set_chip_and_handler(GIU_IRQ(pin),
                                                 &giuint_high_irq_chip,
                                                 handle_level_irq);
                }
@@ -539,9 +539,9 @@ static int __devinit giu_probe(struct platform_device *pdev)
                        chip = &giuint_high_irq_chip;
 
                if (trigger & (1 << pin))
-                       set_irq_chip_and_handler(i, chip, handle_edge_irq);
+                       irq_set_chip_and_handler(i, chip, handle_edge_irq);
                else
-                       set_irq_chip_and_handler(i, chip, handle_level_irq);
+                       irq_set_chip_and_handler(i, chip, handle_level_irq);
 
        }