aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/wm8350-irq.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2010-11-24 13:01:43 -0500
committerSamuel Ortiz <sameo@linux.intel.com>2011-01-14 06:37:40 -0500
commitfdcc475b968f4715ce7a214c061c97a95c77fd21 (patch)
treed27c0f9d7a319322da18760363580cee0a0c8309 /drivers/mfd/wm8350-irq.c
parentba81cd393348b504ecc80d5fc363857f49410d5e (diff)
mfd: Convert WM835x to new irq_ interrupt methods
Kernel 2.6.37 adds new interrupt methods which take a struct irq_data rather than an irq number. Convert over to these as they will become mandatory in future. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/wm8350-irq.c')
-rw-r--r--drivers/mfd/wm8350-irq.c32
1 files changed, 17 insertions, 15 deletions
diff --git a/drivers/mfd/wm8350-irq.c b/drivers/mfd/wm8350-irq.c
index f56c9adf9493..ba966ae88dc3 100644
--- a/drivers/mfd/wm8350-irq.c
+++ b/drivers/mfd/wm8350-irq.c
@@ -417,16 +417,16 @@ static irqreturn_t wm8350_irq(int irq, void *irq_data)
417 return IRQ_HANDLED; 417 return IRQ_HANDLED;
418} 418}
419 419
420static void wm8350_irq_lock(unsigned int irq) 420static void wm8350_irq_lock(struct irq_data *data)
421{ 421{
422 struct wm8350 *wm8350 = get_irq_chip_data(irq); 422 struct wm8350 *wm8350 = data->chip_data;
423 423
424 mutex_lock(&wm8350->irq_lock); 424 mutex_lock(&wm8350->irq_lock);
425} 425}
426 426
427static void wm8350_irq_sync_unlock(unsigned int irq) 427static void wm8350_irq_sync_unlock(struct irq_data *data)
428{ 428{
429 struct wm8350 *wm8350 = get_irq_chip_data(irq); 429 struct wm8350 *wm8350 = data->chip_data;
430 int i; 430 int i;
431 431
432 for (i = 0; i < ARRAY_SIZE(wm8350->irq_masks); i++) { 432 for (i = 0; i < ARRAY_SIZE(wm8350->irq_masks); i++) {
@@ -442,28 +442,30 @@ static void wm8350_irq_sync_unlock(unsigned int irq)
442 mutex_unlock(&wm8350->irq_lock); 442 mutex_unlock(&wm8350->irq_lock);
443} 443}
444 444
445static void wm8350_irq_enable(unsigned int irq) 445static void wm8350_irq_enable(struct irq_data *data)
446{ 446{
447 struct wm8350 *wm8350 = get_irq_chip_data(irq); 447 struct wm8350 *wm8350 = data->chip_data;
448 struct wm8350_irq_data *irq_data = irq_to_wm8350_irq(wm8350, irq); 448 struct wm8350_irq_data *irq_data = irq_to_wm8350_irq(wm8350,
449 data->irq);
449 450
450 wm8350->irq_masks[irq_data->reg] &= ~irq_data->mask; 451 wm8350->irq_masks[irq_data->reg] &= ~irq_data->mask;
451} 452}
452 453
453static void wm8350_irq_disable(unsigned int irq) 454static void wm8350_irq_disable(struct irq_data *data)
454{ 455{
455 struct wm8350 *wm8350 = get_irq_chip_data(irq); 456 struct wm8350 *wm8350 = data->chip_data;
456 struct wm8350_irq_data *irq_data = irq_to_wm8350_irq(wm8350, irq); 457 struct wm8350_irq_data *irq_data = irq_to_wm8350_irq(wm8350,
458 data->irq);
457 459
458 wm8350->irq_masks[irq_data->reg] |= irq_data->mask; 460 wm8350->irq_masks[irq_data->reg] |= irq_data->mask;
459} 461}
460 462
461static struct irq_chip wm8350_irq_chip = { 463static struct irq_chip wm8350_irq_chip = {
462 .name = "wm8350", 464 .name = "wm8350",
463 .bus_lock = wm8350_irq_lock, 465 .irq_bus_lock = wm8350_irq_lock,
464 .bus_sync_unlock = wm8350_irq_sync_unlock, 466 .irq_bus_sync_unlock = wm8350_irq_sync_unlock,
465 .disable = wm8350_irq_disable, 467 .irq_disable = wm8350_irq_disable,
466 .enable = wm8350_irq_enable, 468 .irq_enable = wm8350_irq_enable,
467}; 469};
468 470
469int wm8350_irq_init(struct wm8350 *wm8350, int irq, 471int wm8350_irq_init(struct wm8350 *wm8350, int irq,