Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mfd: Convert tc6393xb driver to new irq_ APIs

The genirq core is being update to pass struct irq_data to irq_chip rather
than an irq number to operations. Update tc6393 to the new API.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Ian Molton <ian@mnementh.co.uk>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>

authored by

Mark Brown and committed by
Samuel Ortiz
01af22eb a4e7fead

+11 -11
+11 -11
drivers/mfd/tc6393xb.c
··· 527 527 } 528 528 } 529 529 530 - static void tc6393xb_irq_ack(unsigned int irq) 530 + static void tc6393xb_irq_ack(struct irq_data *data) 531 531 { 532 532 } 533 533 534 - static void tc6393xb_irq_mask(unsigned int irq) 534 + static void tc6393xb_irq_mask(struct irq_data *data) 535 535 { 536 - struct tc6393xb *tc6393xb = get_irq_chip_data(irq); 536 + struct tc6393xb *tc6393xb = irq_data_get_irq_chip_data(data); 537 537 unsigned long flags; 538 538 u8 imr; 539 539 540 540 spin_lock_irqsave(&tc6393xb->lock, flags); 541 541 imr = tmio_ioread8(tc6393xb->scr + SCR_IMR); 542 - imr |= 1 << (irq - tc6393xb->irq_base); 542 + imr |= 1 << (data->irq - tc6393xb->irq_base); 543 543 tmio_iowrite8(imr, tc6393xb->scr + SCR_IMR); 544 544 spin_unlock_irqrestore(&tc6393xb->lock, flags); 545 545 } 546 546 547 - static void tc6393xb_irq_unmask(unsigned int irq) 547 + static void tc6393xb_irq_unmask(struct irq_data *data) 548 548 { 549 - struct tc6393xb *tc6393xb = get_irq_chip_data(irq); 549 + struct tc6393xb *tc6393xb = irq_data_get_irq_chip_data(data); 550 550 unsigned long flags; 551 551 u8 imr; 552 552 553 553 spin_lock_irqsave(&tc6393xb->lock, flags); 554 554 imr = tmio_ioread8(tc6393xb->scr + SCR_IMR); 555 - imr &= ~(1 << (irq - tc6393xb->irq_base)); 555 + imr &= ~(1 << (data->irq - tc6393xb->irq_base)); 556 556 tmio_iowrite8(imr, tc6393xb->scr + SCR_IMR); 557 557 spin_unlock_irqrestore(&tc6393xb->lock, flags); 558 558 } 559 559 560 560 static struct irq_chip tc6393xb_chip = { 561 - .name = "tc6393xb", 562 - .ack = tc6393xb_irq_ack, 563 - .mask = tc6393xb_irq_mask, 564 - .unmask = tc6393xb_irq_unmask, 561 + .name = "tc6393xb", 562 + .irq_ack = tc6393xb_irq_ack, 563 + .irq_mask = tc6393xb_irq_mask, 564 + .irq_unmask = tc6393xb_irq_unmask, 565 565 }; 566 566 567 567 static void tc6393xb_attach_irq(struct platform_device *dev)