aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio
diff options
context:
space:
mode:
authorLennert Buytenhek <buytenh@wantstofly.org>2011-01-12 20:00:16 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2011-01-13 11:03:13 -0500
commitb2221869dbd84994f07c91be73103d9f9cb7309f (patch)
tree6e4ce3ae3a11405919bed8a8c6bf997bf9fc81cc /drivers/gpio
parent6f5cfc0e2d5feac9094a8b26b9ad1739c1e7d9df (diff)
gpio: pl061: 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> Acked-by: Baruch Siach <baruch@tkos.co.il> Cc: David Brownell <david-b@pacbell.net> 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/pl061.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/gpio/pl061.c b/drivers/gpio/pl061.c
index 5005990f751f..2975d22daffe 100644
--- a/drivers/gpio/pl061.c
+++ b/drivers/gpio/pl061.c
@@ -129,10 +129,10 @@ static int pl061_to_irq(struct gpio_chip *gc, unsigned offset)
129/* 129/*
130 * PL061 GPIO IRQ 130 * PL061 GPIO IRQ
131 */ 131 */
132static void pl061_irq_disable(unsigned irq) 132static void pl061_irq_disable(struct irq_data *d)
133{ 133{
134 struct pl061_gpio *chip = get_irq_chip_data(irq); 134 struct pl061_gpio *chip = irq_data_get_irq_chip_data(d);
135 int offset = irq - chip->irq_base; 135 int offset = d->irq - chip->irq_base;
136 unsigned long flags; 136 unsigned long flags;
137 u8 gpioie; 137 u8 gpioie;
138 138
@@ -143,10 +143,10 @@ static void pl061_irq_disable(unsigned irq)
143 spin_unlock_irqrestore(&chip->irq_lock, flags); 143 spin_unlock_irqrestore(&chip->irq_lock, flags);
144} 144}
145 145
146static void pl061_irq_enable(unsigned irq) 146static void pl061_irq_enable(struct irq_data *d)
147{ 147{
148 struct pl061_gpio *chip = get_irq_chip_data(irq); 148 struct pl061_gpio *chip = irq_data_get_irq_chip_data(d);
149 int offset = irq - chip->irq_base; 149 int offset = d->irq - chip->irq_base;
150 unsigned long flags; 150 unsigned long flags;
151 u8 gpioie; 151 u8 gpioie;
152 152
@@ -157,10 +157,10 @@ static void pl061_irq_enable(unsigned irq)
157 spin_unlock_irqrestore(&chip->irq_lock, flags); 157 spin_unlock_irqrestore(&chip->irq_lock, flags);
158} 158}
159 159
160static int pl061_irq_type(unsigned irq, unsigned trigger) 160static int pl061_irq_type(struct irq_data *d, unsigned trigger)
161{ 161{
162 struct pl061_gpio *chip = get_irq_chip_data(irq); 162 struct pl061_gpio *chip = irq_data_get_irq_chip_data(d);
163 int offset = irq - chip->irq_base; 163 int offset = d->irq - chip->irq_base;
164 unsigned long flags; 164 unsigned long flags;
165 u8 gpiois, gpioibe, gpioiev; 165 u8 gpiois, gpioibe, gpioiev;
166 166
@@ -203,9 +203,9 @@ static int pl061_irq_type(unsigned irq, unsigned trigger)
203 203
204static struct irq_chip pl061_irqchip = { 204static struct irq_chip pl061_irqchip = {
205 .name = "GPIO", 205 .name = "GPIO",
206 .enable = pl061_irq_enable, 206 .irq_enable = pl061_irq_enable,
207 .disable = pl061_irq_disable, 207 .irq_disable = pl061_irq_disable,
208 .set_type = pl061_irq_type, 208 .irq_set_type = pl061_irq_type,
209}; 209};
210 210
211static void pl061_irq_handler(unsigned irq, struct irq_desc *desc) 211static void pl061_irq_handler(unsigned irq, struct irq_desc *desc)
@@ -214,7 +214,7 @@ static void pl061_irq_handler(unsigned irq, struct irq_desc *desc)
214 struct list_head *ptr; 214 struct list_head *ptr;
215 struct pl061_gpio *chip; 215 struct pl061_gpio *chip;
216 216
217 desc->chip->ack(irq); 217 desc->irq_data.chip->irq_ack(&desc->irq_data);
218 list_for_each(ptr, chip_list) { 218 list_for_each(ptr, chip_list) {
219 unsigned long pending; 219 unsigned long pending;
220 int offset; 220 int offset;
@@ -229,7 +229,7 @@ static void pl061_irq_handler(unsigned irq, struct irq_desc *desc)
229 for_each_set_bit(offset, &pending, PL061_GPIO_NR) 229 for_each_set_bit(offset, &pending, PL061_GPIO_NR)
230 generic_handle_irq(pl061_to_irq(&chip->gc, offset)); 230 generic_handle_irq(pl061_to_irq(&chip->gc, offset));
231 } 231 }
232 desc->chip->unmask(irq); 232 desc->irq_data.chip->irq_unmask(&desc->irq_data);
233} 233}
234 234
235static int pl061_probe(struct amba_device *dev, struct amba_id *id) 235static int pl061_probe(struct amba_device *dev, struct amba_id *id)