Commit a4e7fead authored by Mark Brown's avatar Mark Brown Committed by Samuel Ortiz

mfd: Convert t7166xb driver to new irq_ API

The genirq core is being updated to pass struct irq_data rather than an
irq number to irq_chip operations. Update the t7166xb driver to the new
APIs.
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: default avatarIan Molton <ian@mnementh.co.uk>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent 43b8c084
...@@ -199,37 +199,37 @@ static void t7l66xb_irq(unsigned int irq, struct irq_desc *desc) ...@@ -199,37 +199,37 @@ static void t7l66xb_irq(unsigned int irq, struct irq_desc *desc)
generic_handle_irq(irq_base + i); generic_handle_irq(irq_base + i);
} }
static void t7l66xb_irq_mask(unsigned int irq) static void t7l66xb_irq_mask(struct irq_data *data)
{ {
struct t7l66xb *t7l66xb = get_irq_chip_data(irq); struct t7l66xb *t7l66xb = irq_data_get_irq_chip_data(data);
unsigned long flags; unsigned long flags;
u8 imr; u8 imr;
spin_lock_irqsave(&t7l66xb->lock, flags); spin_lock_irqsave(&t7l66xb->lock, flags);
imr = tmio_ioread8(t7l66xb->scr + SCR_IMR); imr = tmio_ioread8(t7l66xb->scr + SCR_IMR);
imr |= 1 << (irq - t7l66xb->irq_base); imr |= 1 << (data->irq - t7l66xb->irq_base);
tmio_iowrite8(imr, t7l66xb->scr + SCR_IMR); tmio_iowrite8(imr, t7l66xb->scr + SCR_IMR);
spin_unlock_irqrestore(&t7l66xb->lock, flags); spin_unlock_irqrestore(&t7l66xb->lock, flags);
} }
static void t7l66xb_irq_unmask(unsigned int irq) static void t7l66xb_irq_unmask(struct irq_data *data)
{ {
struct t7l66xb *t7l66xb = get_irq_chip_data(irq); struct t7l66xb *t7l66xb = irq_data_get_irq_chip_data(data);
unsigned long flags; unsigned long flags;
u8 imr; u8 imr;
spin_lock_irqsave(&t7l66xb->lock, flags); spin_lock_irqsave(&t7l66xb->lock, flags);
imr = tmio_ioread8(t7l66xb->scr + SCR_IMR); imr = tmio_ioread8(t7l66xb->scr + SCR_IMR);
imr &= ~(1 << (irq - t7l66xb->irq_base)); imr &= ~(1 << (data->irq - t7l66xb->irq_base));
tmio_iowrite8(imr, t7l66xb->scr + SCR_IMR); tmio_iowrite8(imr, t7l66xb->scr + SCR_IMR);
spin_unlock_irqrestore(&t7l66xb->lock, flags); spin_unlock_irqrestore(&t7l66xb->lock, flags);
} }
static struct irq_chip t7l66xb_chip = { static struct irq_chip t7l66xb_chip = {
.name = "t7l66xb", .name = "t7l66xb",
.ack = t7l66xb_irq_mask, .irq_ack = t7l66xb_irq_mask,
.mask = t7l66xb_irq_mask, .irq_mask = t7l66xb_irq_mask,
.unmask = t7l66xb_irq_unmask, .irq_unmask = t7l66xb_irq_unmask,
}; };
/*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment