Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
[pandora-kernel.git] / drivers / gpio / vr41xx_giu.c
index b16c9a8..a365be0 100644 (file)
@@ -111,69 +111,69 @@ static inline u16 giu_clear(u16 offset, u16 clear)
        return data;
 }
 
-static void ack_giuint_low(unsigned int irq)
+static void ack_giuint_low(struct irq_data *d)
 {
-       giu_write(GIUINTSTATL, 1 << GPIO_PIN_OF_IRQ(irq));
+       giu_write(GIUINTSTATL, 1 << GPIO_PIN_OF_IRQ(d->irq));
 }
 
-static void mask_giuint_low(unsigned int irq)
+static void mask_giuint_low(struct irq_data *d)
 {
-       giu_clear(GIUINTENL, 1 << GPIO_PIN_OF_IRQ(irq));
+       giu_clear(GIUINTENL, 1 << GPIO_PIN_OF_IRQ(d->irq));
 }
 
-static void mask_ack_giuint_low(unsigned int irq)
+static void mask_ack_giuint_low(struct irq_data *d)
 {
        unsigned int pin;
 
-       pin = GPIO_PIN_OF_IRQ(irq);
+       pin = GPIO_PIN_OF_IRQ(d->irq);
        giu_clear(GIUINTENL, 1 << pin);
        giu_write(GIUINTSTATL, 1 << pin);
 }
 
-static void unmask_giuint_low(unsigned int irq)
+static void unmask_giuint_low(struct irq_data *d)
 {
-       giu_set(GIUINTENL, 1 << GPIO_PIN_OF_IRQ(irq));
+       giu_set(GIUINTENL, 1 << GPIO_PIN_OF_IRQ(d->irq));
 }
 
 static struct irq_chip giuint_low_irq_chip = {
        .name           = "GIUINTL",
-       .ack            = ack_giuint_low,
-       .mask           = mask_giuint_low,
-       .mask_ack       = mask_ack_giuint_low,
-       .unmask         = unmask_giuint_low,
+       .irq_ack        = ack_giuint_low,
+       .irq_mask       = mask_giuint_low,
+       .irq_mask_ack   = mask_ack_giuint_low,
+       .irq_unmask     = unmask_giuint_low,
 };
 
-static void ack_giuint_high(unsigned int irq)
+static void ack_giuint_high(struct irq_data *d)
 {
        giu_write(GIUINTSTATH,
-                 1 << (GPIO_PIN_OF_IRQ(irq) - GIUINT_HIGH_OFFSET));
+                 1 << (GPIO_PIN_OF_IRQ(d->irq) - GIUINT_HIGH_OFFSET));
 }
 
-static void mask_giuint_high(unsigned int irq)
+static void mask_giuint_high(struct irq_data *d)
 {
-       giu_clear(GIUINTENH, 1 << (GPIO_PIN_OF_IRQ(irq) - GIUINT_HIGH_OFFSET));
+       giu_clear(GIUINTENH, 1 << (GPIO_PIN_OF_IRQ(d->irq) - GIUINT_HIGH_OFFSET));
 }
 
-static void mask_ack_giuint_high(unsigned int irq)
+static void mask_ack_giuint_high(struct irq_data *d)
 {
        unsigned int pin;
 
-       pin = GPIO_PIN_OF_IRQ(irq) - GIUINT_HIGH_OFFSET;
+       pin = GPIO_PIN_OF_IRQ(d->irq) - GIUINT_HIGH_OFFSET;
        giu_clear(GIUINTENH, 1 << pin);
        giu_write(GIUINTSTATH, 1 << pin);
 }
 
-static void unmask_giuint_high(unsigned int irq)
+static void unmask_giuint_high(struct irq_data *d)
 {
-       giu_set(GIUINTENH, 1 << (GPIO_PIN_OF_IRQ(irq) - GIUINT_HIGH_OFFSET));
+       giu_set(GIUINTENH, 1 << (GPIO_PIN_OF_IRQ(d->irq) - GIUINT_HIGH_OFFSET));
 }
 
 static struct irq_chip giuint_high_irq_chip = {
        .name           = "GIUINTH",
-       .ack            = ack_giuint_high,
-       .mask           = mask_giuint_high,
-       .mask_ack       = mask_ack_giuint_high,
-       .unmask         = unmask_giuint_high,
+       .irq_ack        = ack_giuint_high,
+       .irq_mask       = mask_giuint_high,
+       .irq_mask_ack   = mask_ack_giuint_high,
+       .irq_unmask     = unmask_giuint_high,
 };
 
 static int giu_get_irq(unsigned int irq)
@@ -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);
 
        }