aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio
diff options
context:
space:
mode:
authorLennert Buytenhek <buytenh@wantstofly.org>2011-01-12 20:00:19 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2011-01-13 11:03:14 -0500
commita1f5f22adc3206c47e70652c12671666c65b579f (patch)
tree8dc56b60f617b151905ac4cbda12688048e29750 /drivers/gpio
parent33fcc1b80259a9c09074a3859c26772f3d595c20 (diff)
gpio: timbgpio: irq_data conversion
Converts irq_chips and flow handlers over to the new struct irq_data based irq_chip functions. Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca> Cc: Richard Röjfors <richard.rojfors@mocean-labs.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/timbgpio.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/gpio/timbgpio.c b/drivers/gpio/timbgpio.c
index 45293662e950..349131eb1ce0 100644
--- a/drivers/gpio/timbgpio.c
+++ b/drivers/gpio/timbgpio.c
@@ -109,10 +109,10 @@ static int timbgpio_to_irq(struct gpio_chip *gpio, unsigned offset)
109/* 109/*
110 * GPIO IRQ 110 * GPIO IRQ
111 */ 111 */
112static void timbgpio_irq_disable(unsigned irq) 112static void timbgpio_irq_disable(struct irq_data *d)
113{ 113{
114 struct timbgpio *tgpio = get_irq_chip_data(irq); 114 struct timbgpio *tgpio = irq_data_get_irq_chip_data(d);
115 int offset = irq - tgpio->irq_base; 115 int offset = d->irq - tgpio->irq_base;
116 unsigned long flags; 116 unsigned long flags;
117 117
118 spin_lock_irqsave(&tgpio->lock, flags); 118 spin_lock_irqsave(&tgpio->lock, flags);
@@ -121,10 +121,10 @@ static void timbgpio_irq_disable(unsigned irq)
121 spin_unlock_irqrestore(&tgpio->lock, flags); 121 spin_unlock_irqrestore(&tgpio->lock, flags);
122} 122}
123 123
124static void timbgpio_irq_enable(unsigned irq) 124static void timbgpio_irq_enable(struct irq_data *d)
125{ 125{
126 struct timbgpio *tgpio = get_irq_chip_data(irq); 126 struct timbgpio *tgpio = irq_data_get_irq_chip_data(d);
127 int offset = irq - tgpio->irq_base; 127 int offset = d->irq - tgpio->irq_base;
128 unsigned long flags; 128 unsigned long flags;
129 129
130 spin_lock_irqsave(&tgpio->lock, flags); 130 spin_lock_irqsave(&tgpio->lock, flags);
@@ -133,10 +133,10 @@ static void timbgpio_irq_enable(unsigned irq)
133 spin_unlock_irqrestore(&tgpio->lock, flags); 133 spin_unlock_irqrestore(&tgpio->lock, flags);
134} 134}
135 135
136static int timbgpio_irq_type(unsigned irq, unsigned trigger) 136static int timbgpio_irq_type(struct irq_data *d, unsigned trigger)
137{ 137{
138 struct timbgpio *tgpio = get_irq_chip_data(irq); 138 struct timbgpio *tgpio = irq_data_get_irq_chip_data(d);
139 int offset = irq - tgpio->irq_base; 139 int offset = d->irq - tgpio->irq_base;
140 unsigned long flags; 140 unsigned long flags;
141 u32 lvr, flr, bflr = 0; 141 u32 lvr, flr, bflr = 0;
142 u32 ver; 142 u32 ver;
@@ -193,13 +193,13 @@ out:
193 return ret; 193 return ret;
194} 194}
195 195
196static void timbgpio_irq(unsigned int irq, struct irq_desc *desc) 196static void timbgpio_irq(struct irq_data *d, struct irq_desc *desc)
197{ 197{
198 struct timbgpio *tgpio = get_irq_data(irq); 198 struct timbgpio *tgpio = irq_data_get_irq_data(d);
199 unsigned long ipr; 199 unsigned long ipr;
200 int offset; 200 int offset;
201 201
202 desc->chip->ack(irq); 202 desc->irq_data.chip->ack(irq_get_irq_data(d));
203 ipr = ioread32(tgpio->membase + TGPIO_IPR); 203 ipr = ioread32(tgpio->membase + TGPIO_IPR);
204 iowrite32(ipr, tgpio->membase + TGPIO_ICR); 204 iowrite32(ipr, tgpio->membase + TGPIO_ICR);
205 205
@@ -217,9 +217,9 @@ static void timbgpio_irq(unsigned int irq, struct irq_desc *desc)
217 217
218static struct irq_chip timbgpio_irqchip = { 218static struct irq_chip timbgpio_irqchip = {
219 .name = "GPIO", 219 .name = "GPIO",
220 .enable = timbgpio_irq_enable, 220 .irq_enable = timbgpio_irq_enable,
221 .disable = timbgpio_irq_disable, 221 .irq_disable = timbgpio_irq_disable,
222 .set_type = timbgpio_irq_type, 222 .irq_set_type = timbgpio_irq_type,
223}; 223};
224 224
225static int __devinit timbgpio_probe(struct platform_device *pdev) 225static int __devinit timbgpio_probe(struct platform_device *pdev)