Commit b2221869dbd84994f07c91be73103d9f9cb7309f

Authored by Lennert Buytenhek
Committed by Linus Torvalds
1 parent 6f5cfc0e2d

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>

Showing 1 changed file with 14 additions and 14 deletions Side-by-side Diff

drivers/gpio/pl061.c
... ... @@ -129,10 +129,10 @@
129 129 /*
130 130 * PL061 GPIO IRQ
131 131 */
132   -static void pl061_irq_disable(unsigned irq)
  132 +static void pl061_irq_disable(struct irq_data *d)
133 133 {
134   - struct pl061_gpio *chip = get_irq_chip_data(irq);
135   - int offset = irq - chip->irq_base;
  134 + struct pl061_gpio *chip = irq_data_get_irq_chip_data(d);
  135 + int offset = d->irq - chip->irq_base;
136 136 unsigned long flags;
137 137 u8 gpioie;
138 138  
139 139  
... ... @@ -143,10 +143,10 @@
143 143 spin_unlock_irqrestore(&chip->irq_lock, flags);
144 144 }
145 145  
146   -static void pl061_irq_enable(unsigned irq)
  146 +static void pl061_irq_enable(struct irq_data *d)
147 147 {
148   - struct pl061_gpio *chip = get_irq_chip_data(irq);
149   - int offset = irq - chip->irq_base;
  148 + struct pl061_gpio *chip = irq_data_get_irq_chip_data(d);
  149 + int offset = d->irq - chip->irq_base;
150 150 unsigned long flags;
151 151 u8 gpioie;
152 152  
153 153  
... ... @@ -157,10 +157,10 @@
157 157 spin_unlock_irqrestore(&chip->irq_lock, flags);
158 158 }
159 159  
160   -static int pl061_irq_type(unsigned irq, unsigned trigger)
  160 +static int pl061_irq_type(struct irq_data *d, unsigned trigger)
161 161 {
162   - struct pl061_gpio *chip = get_irq_chip_data(irq);
163   - int offset = irq - chip->irq_base;
  162 + struct pl061_gpio *chip = irq_data_get_irq_chip_data(d);
  163 + int offset = d->irq - chip->irq_base;
164 164 unsigned long flags;
165 165 u8 gpiois, gpioibe, gpioiev;
166 166  
... ... @@ -203,9 +203,9 @@
203 203  
204 204 static struct irq_chip pl061_irqchip = {
205 205 .name = "GPIO",
206   - .enable = pl061_irq_enable,
207   - .disable = pl061_irq_disable,
208   - .set_type = pl061_irq_type,
  206 + .irq_enable = pl061_irq_enable,
  207 + .irq_disable = pl061_irq_disable,
  208 + .irq_set_type = pl061_irq_type,
209 209 };
210 210  
211 211 static void pl061_irq_handler(unsigned irq, struct irq_desc *desc)
... ... @@ -214,7 +214,7 @@
214 214 struct list_head *ptr;
215 215 struct pl061_gpio *chip;
216 216  
217   - desc->chip->ack(irq);
  217 + desc->irq_data.chip->irq_ack(&desc->irq_data);
218 218 list_for_each(ptr, chip_list) {
219 219 unsigned long pending;
220 220 int offset;
... ... @@ -229,7 +229,7 @@
229 229 for_each_set_bit(offset, &pending, PL061_GPIO_NR)
230 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  
235 235 static int pl061_probe(struct amba_device *dev, struct amba_id *id)