Commit 01af22eb authored by Mark Brown's avatar Mark Brown Committed by Samuel Ortiz

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: 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 a4e7fead
...@@ -527,41 +527,41 @@ tc6393xb_irq(unsigned int irq, struct irq_desc *desc) ...@@ -527,41 +527,41 @@ tc6393xb_irq(unsigned int irq, struct irq_desc *desc)
} }
} }
static void tc6393xb_irq_ack(unsigned int irq) static void tc6393xb_irq_ack(struct irq_data *data)
{ {
} }
static void tc6393xb_irq_mask(unsigned int irq) static void tc6393xb_irq_mask(struct irq_data *data)
{ {
struct tc6393xb *tc6393xb = get_irq_chip_data(irq); struct tc6393xb *tc6393xb = irq_data_get_irq_chip_data(data);
unsigned long flags; unsigned long flags;
u8 imr; u8 imr;
spin_lock_irqsave(&tc6393xb->lock, flags); spin_lock_irqsave(&tc6393xb->lock, flags);
imr = tmio_ioread8(tc6393xb->scr + SCR_IMR); imr = tmio_ioread8(tc6393xb->scr + SCR_IMR);
imr |= 1 << (irq - tc6393xb->irq_base); imr |= 1 << (data->irq - tc6393xb->irq_base);
tmio_iowrite8(imr, tc6393xb->scr + SCR_IMR); tmio_iowrite8(imr, tc6393xb->scr + SCR_IMR);
spin_unlock_irqrestore(&tc6393xb->lock, flags); spin_unlock_irqrestore(&tc6393xb->lock, flags);
} }
static void tc6393xb_irq_unmask(unsigned int irq) static void tc6393xb_irq_unmask(struct irq_data *data)
{ {
struct tc6393xb *tc6393xb = get_irq_chip_data(irq); struct tc6393xb *tc6393xb = irq_data_get_irq_chip_data(data);
unsigned long flags; unsigned long flags;
u8 imr; u8 imr;
spin_lock_irqsave(&tc6393xb->lock, flags); spin_lock_irqsave(&tc6393xb->lock, flags);
imr = tmio_ioread8(tc6393xb->scr + SCR_IMR); imr = tmio_ioread8(tc6393xb->scr + SCR_IMR);
imr &= ~(1 << (irq - tc6393xb->irq_base)); imr &= ~(1 << (data->irq - tc6393xb->irq_base));
tmio_iowrite8(imr, tc6393xb->scr + SCR_IMR); tmio_iowrite8(imr, tc6393xb->scr + SCR_IMR);
spin_unlock_irqrestore(&tc6393xb->lock, flags); spin_unlock_irqrestore(&tc6393xb->lock, flags);
} }
static struct irq_chip tc6393xb_chip = { static struct irq_chip tc6393xb_chip = {
.name = "tc6393xb", .name = "tc6393xb",
.ack = tc6393xb_irq_ack, .irq_ack = tc6393xb_irq_ack,
.mask = tc6393xb_irq_mask, .irq_mask = tc6393xb_irq_mask,
.unmask = tc6393xb_irq_unmask, .irq_unmask = tc6393xb_irq_unmask,
}; };
static void tc6393xb_attach_irq(struct platform_device *dev) static void tc6393xb_attach_irq(struct platform_device *dev)
......
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