diff options
author | Lennert Buytenhek <buytenh@wantstofly.org> | 2011-01-12 20:00:14 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-13 11:03:13 -0500 |
commit | fbc4667ab08a1c43c6141ce844005c76883e1930 (patch) | |
tree | 086a75958294be1a5f68f0ec0b1cb039ca9418c9 /drivers/gpio/max732x.c | |
parent | 5ffd72c674a8332b37cfd62c364bc5492e8ea4c5 (diff) |
gpio: max732x: 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: Marc Zyngier <maz@misterjones.org>
Cc: Eric Miao <eric.y.miao@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/gpio/max732x.c')
-rw-r--r-- | drivers/gpio/max732x.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/drivers/gpio/max732x.c b/drivers/gpio/max732x.c index 9cad60f9e962..9e1d01f0071a 100644 --- a/drivers/gpio/max732x.c +++ b/drivers/gpio/max732x.c | |||
@@ -327,40 +327,40 @@ static int max732x_gpio_to_irq(struct gpio_chip *gc, unsigned off) | |||
327 | return chip->irq_base + off; | 327 | return chip->irq_base + off; |
328 | } | 328 | } |
329 | 329 | ||
330 | static void max732x_irq_mask(unsigned int irq) | 330 | static void max732x_irq_mask(struct irq_data *d) |
331 | { | 331 | { |
332 | struct max732x_chip *chip = get_irq_chip_data(irq); | 332 | struct max732x_chip *chip = irq_data_get_irq_chip_data(d); |
333 | 333 | ||
334 | chip->irq_mask_cur &= ~(1 << (irq - chip->irq_base)); | 334 | chip->irq_mask_cur &= ~(1 << (d->irq - chip->irq_base)); |
335 | } | 335 | } |
336 | 336 | ||
337 | static void max732x_irq_unmask(unsigned int irq) | 337 | static void max732x_irq_unmask(struct irq_data *d) |
338 | { | 338 | { |
339 | struct max732x_chip *chip = get_irq_chip_data(irq); | 339 | struct max732x_chip *chip = irq_data_get_irq_chip_data(d); |
340 | 340 | ||
341 | chip->irq_mask_cur |= 1 << (irq - chip->irq_base); | 341 | chip->irq_mask_cur |= 1 << (d->irq - chip->irq_base); |
342 | } | 342 | } |
343 | 343 | ||
344 | static void max732x_irq_bus_lock(unsigned int irq) | 344 | static void max732x_irq_bus_lock(struct irq_data *d) |
345 | { | 345 | { |
346 | struct max732x_chip *chip = get_irq_chip_data(irq); | 346 | struct max732x_chip *chip = irq_data_get_irq_chip_data(d); |
347 | 347 | ||
348 | mutex_lock(&chip->irq_lock); | 348 | mutex_lock(&chip->irq_lock); |
349 | chip->irq_mask_cur = chip->irq_mask; | 349 | chip->irq_mask_cur = chip->irq_mask; |
350 | } | 350 | } |
351 | 351 | ||
352 | static void max732x_irq_bus_sync_unlock(unsigned int irq) | 352 | static void max732x_irq_bus_sync_unlock(struct irq_data *d) |
353 | { | 353 | { |
354 | struct max732x_chip *chip = get_irq_chip_data(irq); | 354 | struct max732x_chip *chip = irq_data_get_irq_chip_data(d); |
355 | 355 | ||
356 | max732x_irq_update_mask(chip); | 356 | max732x_irq_update_mask(chip); |
357 | mutex_unlock(&chip->irq_lock); | 357 | mutex_unlock(&chip->irq_lock); |
358 | } | 358 | } |
359 | 359 | ||
360 | static int max732x_irq_set_type(unsigned int irq, unsigned int type) | 360 | static int max732x_irq_set_type(struct irq_data *d, unsigned int type) |
361 | { | 361 | { |
362 | struct max732x_chip *chip = get_irq_chip_data(irq); | 362 | struct max732x_chip *chip = irq_data_get_irq_chip_data(d); |
363 | uint16_t off = irq - chip->irq_base; | 363 | uint16_t off = d->irq - chip->irq_base; |
364 | uint16_t mask = 1 << off; | 364 | uint16_t mask = 1 << off; |
365 | 365 | ||
366 | if (!(mask & chip->dir_input)) { | 366 | if (!(mask & chip->dir_input)) { |
@@ -371,7 +371,7 @@ static int max732x_irq_set_type(unsigned int irq, unsigned int type) | |||
371 | 371 | ||
372 | if (!(type & IRQ_TYPE_EDGE_BOTH)) { | 372 | if (!(type & IRQ_TYPE_EDGE_BOTH)) { |
373 | dev_err(&chip->client->dev, "irq %d: unsupported type %d\n", | 373 | dev_err(&chip->client->dev, "irq %d: unsupported type %d\n", |
374 | irq, type); | 374 | d->irq, type); |
375 | return -EINVAL; | 375 | return -EINVAL; |
376 | } | 376 | } |
377 | 377 | ||
@@ -390,11 +390,11 @@ static int max732x_irq_set_type(unsigned int irq, unsigned int type) | |||
390 | 390 | ||
391 | static struct irq_chip max732x_irq_chip = { | 391 | static struct irq_chip max732x_irq_chip = { |
392 | .name = "max732x", | 392 | .name = "max732x", |
393 | .mask = max732x_irq_mask, | 393 | .irq_mask = max732x_irq_mask, |
394 | .unmask = max732x_irq_unmask, | 394 | .irq_unmask = max732x_irq_unmask, |
395 | .bus_lock = max732x_irq_bus_lock, | 395 | .irq_bus_lock = max732x_irq_bus_lock, |
396 | .bus_sync_unlock = max732x_irq_bus_sync_unlock, | 396 | .irq_bus_sync_unlock = max732x_irq_bus_sync_unlock, |
397 | .set_type = max732x_irq_set_type, | 397 | .irq_set_type = max732x_irq_set_type, |
398 | }; | 398 | }; |
399 | 399 | ||
400 | static uint8_t max732x_irq_pending(struct max732x_chip *chip) | 400 | static uint8_t max732x_irq_pending(struct max732x_chip *chip) |