diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-12-11 07:31:31 -0500 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2011-01-14 06:37:51 -0500 |
commit | 49f89d9acb6cba6475923e42a3d13540a70a926e (patch) | |
tree | 6e8381e4571cf3b3e96d663b0b8c5b604b3cd508 /drivers/mfd/88pm860x-core.c | |
parent | 8d2d3a3a329ebf20f733ac1499ebc565f497f051 (diff) |
mfd: Convert 88PM860x driver to new irq_ APIs
The interrupt controller APIs are being updated to pass a struct irq_data
rather than the interrupt number.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/88pm860x-core.c')
-rw-r--r-- | drivers/mfd/88pm860x-core.c | 36 |
1 files changed, 15 insertions, 21 deletions
diff --git a/drivers/mfd/88pm860x-core.c b/drivers/mfd/88pm860x-core.c index 20895e7a99c9..793300c554b4 100644 --- a/drivers/mfd/88pm860x-core.c +++ b/drivers/mfd/88pm860x-core.c | |||
@@ -361,12 +361,6 @@ static struct pm860x_irq_data pm860x_irqs[] = { | |||
361 | }, | 361 | }, |
362 | }; | 362 | }; |
363 | 363 | ||
364 | static inline struct pm860x_irq_data *irq_to_pm860x(struct pm860x_chip *chip, | ||
365 | int irq) | ||
366 | { | ||
367 | return &pm860x_irqs[irq - chip->irq_base]; | ||
368 | } | ||
369 | |||
370 | static irqreturn_t pm860x_irq(int irq, void *data) | 364 | static irqreturn_t pm860x_irq(int irq, void *data) |
371 | { | 365 | { |
372 | struct pm860x_chip *chip = data; | 366 | struct pm860x_chip *chip = data; |
@@ -388,16 +382,16 @@ static irqreturn_t pm860x_irq(int irq, void *data) | |||
388 | return IRQ_HANDLED; | 382 | return IRQ_HANDLED; |
389 | } | 383 | } |
390 | 384 | ||
391 | static void pm860x_irq_lock(unsigned int irq) | 385 | static void pm860x_irq_lock(struct irq_data *data) |
392 | { | 386 | { |
393 | struct pm860x_chip *chip = get_irq_chip_data(irq); | 387 | struct pm860x_chip *chip = irq_data_get_irq_chip_data(data); |
394 | 388 | ||
395 | mutex_lock(&chip->irq_lock); | 389 | mutex_lock(&chip->irq_lock); |
396 | } | 390 | } |
397 | 391 | ||
398 | static void pm860x_irq_sync_unlock(unsigned int irq) | 392 | static void pm860x_irq_sync_unlock(struct irq_data *data) |
399 | { | 393 | { |
400 | struct pm860x_chip *chip = get_irq_chip_data(irq); | 394 | struct pm860x_chip *chip = irq_data_get_irq_chip_data(data); |
401 | struct pm860x_irq_data *irq_data; | 395 | struct pm860x_irq_data *irq_data; |
402 | struct i2c_client *i2c; | 396 | struct i2c_client *i2c; |
403 | static unsigned char cached[3] = {0x0, 0x0, 0x0}; | 397 | static unsigned char cached[3] = {0x0, 0x0, 0x0}; |
@@ -439,25 +433,25 @@ static void pm860x_irq_sync_unlock(unsigned int irq) | |||
439 | mutex_unlock(&chip->irq_lock); | 433 | mutex_unlock(&chip->irq_lock); |
440 | } | 434 | } |
441 | 435 | ||
442 | static void pm860x_irq_enable(unsigned int irq) | 436 | static void pm860x_irq_enable(struct irq_data *data) |
443 | { | 437 | { |
444 | struct pm860x_chip *chip = get_irq_chip_data(irq); | 438 | struct pm860x_chip *chip = irq_data_get_irq_chip_data(data); |
445 | pm860x_irqs[irq - chip->irq_base].enable | 439 | pm860x_irqs[data->irq - chip->irq_base].enable |
446 | = pm860x_irqs[irq - chip->irq_base].offs; | 440 | = pm860x_irqs[data->irq - chip->irq_base].offs; |
447 | } | 441 | } |
448 | 442 | ||
449 | static void pm860x_irq_disable(unsigned int irq) | 443 | static void pm860x_irq_disable(struct irq_data *data) |
450 | { | 444 | { |
451 | struct pm860x_chip *chip = get_irq_chip_data(irq); | 445 | struct pm860x_chip *chip = irq_data_get_irq_chip_data(data); |
452 | pm860x_irqs[irq - chip->irq_base].enable = 0; | 446 | pm860x_irqs[data->irq - chip->irq_base].enable = 0; |
453 | } | 447 | } |
454 | 448 | ||
455 | static struct irq_chip pm860x_irq_chip = { | 449 | static struct irq_chip pm860x_irq_chip = { |
456 | .name = "88pm860x", | 450 | .name = "88pm860x", |
457 | .bus_lock = pm860x_irq_lock, | 451 | .irq_bus_lock = pm860x_irq_lock, |
458 | .bus_sync_unlock = pm860x_irq_sync_unlock, | 452 | .irq_bus_sync_unlock = pm860x_irq_sync_unlock, |
459 | .enable = pm860x_irq_enable, | 453 | .irq_enable = pm860x_irq_enable, |
460 | .disable = pm860x_irq_disable, | 454 | .irq_disable = pm860x_irq_disable, |
461 | }; | 455 | }; |
462 | 456 | ||
463 | static int __devinit device_gpadc_init(struct pm860x_chip *chip, | 457 | static int __devinit device_gpadc_init(struct pm860x_chip *chip, |