diff options
author | Lennert Buytenhek <buytenh@wantstofly.org> | 2011-01-12 20:00:15 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-13 11:03:13 -0500 |
commit | 6f5cfc0e2d5feac9094a8b26b9ad1739c1e7d9df (patch) | |
tree | d0a8b095a18962e104ac388d7d41c8e420a98c11 /drivers | |
parent | fbc4667ab08a1c43c6141ce844005c76883e1930 (diff) |
gpio: pca953x: 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: Alek Du <alek.du@intel.com>
Cc: Alan Cox <alan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpio/pca953x.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/drivers/gpio/pca953x.c b/drivers/gpio/pca953x.c index 501866662e05..a261972f603d 100644 --- a/drivers/gpio/pca953x.c +++ b/drivers/gpio/pca953x.c | |||
@@ -228,30 +228,30 @@ static int pca953x_gpio_to_irq(struct gpio_chip *gc, unsigned off) | |||
228 | return chip->irq_base + off; | 228 | return chip->irq_base + off; |
229 | } | 229 | } |
230 | 230 | ||
231 | static void pca953x_irq_mask(unsigned int irq) | 231 | static void pca953x_irq_mask(struct irq_data *d) |
232 | { | 232 | { |
233 | struct pca953x_chip *chip = get_irq_chip_data(irq); | 233 | struct pca953x_chip *chip = irq_data_get_irq_chip_data(d); |
234 | 234 | ||
235 | chip->irq_mask &= ~(1 << (irq - chip->irq_base)); | 235 | chip->irq_mask &= ~(1 << (d->irq - chip->irq_base)); |
236 | } | 236 | } |
237 | 237 | ||
238 | static void pca953x_irq_unmask(unsigned int irq) | 238 | static void pca953x_irq_unmask(struct irq_data *d) |
239 | { | 239 | { |
240 | struct pca953x_chip *chip = get_irq_chip_data(irq); | 240 | struct pca953x_chip *chip = irq_data_get_irq_chip_data(d); |
241 | 241 | ||
242 | chip->irq_mask |= 1 << (irq - chip->irq_base); | 242 | chip->irq_mask |= 1 << (d->irq - chip->irq_base); |
243 | } | 243 | } |
244 | 244 | ||
245 | static void pca953x_irq_bus_lock(unsigned int irq) | 245 | static void pca953x_irq_bus_lock(struct irq_data *d) |
246 | { | 246 | { |
247 | struct pca953x_chip *chip = get_irq_chip_data(irq); | 247 | struct pca953x_chip *chip = irq_data_get_irq_chip_data(d); |
248 | 248 | ||
249 | mutex_lock(&chip->irq_lock); | 249 | mutex_lock(&chip->irq_lock); |
250 | } | 250 | } |
251 | 251 | ||
252 | static void pca953x_irq_bus_sync_unlock(unsigned int irq) | 252 | static void pca953x_irq_bus_sync_unlock(struct irq_data *d) |
253 | { | 253 | { |
254 | struct pca953x_chip *chip = get_irq_chip_data(irq); | 254 | struct pca953x_chip *chip = irq_data_get_irq_chip_data(d); |
255 | uint16_t new_irqs; | 255 | uint16_t new_irqs; |
256 | uint16_t level; | 256 | uint16_t level; |
257 | 257 | ||
@@ -268,15 +268,15 @@ static void pca953x_irq_bus_sync_unlock(unsigned int irq) | |||
268 | mutex_unlock(&chip->irq_lock); | 268 | mutex_unlock(&chip->irq_lock); |
269 | } | 269 | } |
270 | 270 | ||
271 | static int pca953x_irq_set_type(unsigned int irq, unsigned int type) | 271 | static int pca953x_irq_set_type(struct irq_data *d, unsigned int type) |
272 | { | 272 | { |
273 | struct pca953x_chip *chip = get_irq_chip_data(irq); | 273 | struct pca953x_chip *chip = irq_data_get_irq_chip_data(d); |
274 | uint16_t level = irq - chip->irq_base; | 274 | uint16_t level = d->irq - chip->irq_base; |
275 | uint16_t mask = 1 << level; | 275 | uint16_t mask = 1 << level; |
276 | 276 | ||
277 | if (!(type & IRQ_TYPE_EDGE_BOTH)) { | 277 | if (!(type & IRQ_TYPE_EDGE_BOTH)) { |
278 | dev_err(&chip->client->dev, "irq %d: unsupported type %d\n", | 278 | dev_err(&chip->client->dev, "irq %d: unsupported type %d\n", |
279 | irq, type); | 279 | d->irq, type); |
280 | return -EINVAL; | 280 | return -EINVAL; |
281 | } | 281 | } |
282 | 282 | ||
@@ -295,11 +295,11 @@ static int pca953x_irq_set_type(unsigned int irq, unsigned int type) | |||
295 | 295 | ||
296 | static struct irq_chip pca953x_irq_chip = { | 296 | static struct irq_chip pca953x_irq_chip = { |
297 | .name = "pca953x", | 297 | .name = "pca953x", |
298 | .mask = pca953x_irq_mask, | 298 | .irq_mask = pca953x_irq_mask, |
299 | .unmask = pca953x_irq_unmask, | 299 | .irq_unmask = pca953x_irq_unmask, |
300 | .bus_lock = pca953x_irq_bus_lock, | 300 | .irq_bus_lock = pca953x_irq_bus_lock, |
301 | .bus_sync_unlock = pca953x_irq_bus_sync_unlock, | 301 | .irq_bus_sync_unlock = pca953x_irq_bus_sync_unlock, |
302 | .set_type = pca953x_irq_set_type, | 302 | .irq_set_type = pca953x_irq_set_type, |
303 | }; | 303 | }; |
304 | 304 | ||
305 | static uint16_t pca953x_irq_pending(struct pca953x_chip *chip) | 305 | static uint16_t pca953x_irq_pending(struct pca953x_chip *chip) |