mfd: Convert AB3500 to new irq_ APIs
The genirq core is being updated to pass struct irq_data rather than irq numbers into chip drivers. As part of the update assignments to NULL for unused operations are removed, these are not needed and the genirq docs should be good enough. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Mattias Wallin <mattias.wallin@stericsson.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
parent
0f76aaebe8
commit
c91ad349d0
|
@ -1159,15 +1159,16 @@ static void ab3550_mask_work(struct work_struct *work)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ab3550_mask(unsigned int irq)
|
static void ab3550_mask(struct irq_data *data)
|
||||||
{
|
{
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
struct ab3550 *ab;
|
struct ab3550 *ab;
|
||||||
struct ab3550_platform_data *plf_data;
|
struct ab3550_platform_data *plf_data;
|
||||||
|
int irq;
|
||||||
|
|
||||||
ab = get_irq_chip_data(irq);
|
ab = irq_data_get_irq_chip_data(data);
|
||||||
plf_data = ab->i2c_client[0]->dev.platform_data;
|
plf_data = ab->i2c_client[0]->dev.platform_data;
|
||||||
irq -= plf_data->irq.base;
|
irq = data->irq - plf_data->irq.base;
|
||||||
|
|
||||||
spin_lock_irqsave(&ab->event_lock, flags);
|
spin_lock_irqsave(&ab->event_lock, flags);
|
||||||
ab->event_mask[irq / 8] |= BIT(irq % 8);
|
ab->event_mask[irq / 8] |= BIT(irq % 8);
|
||||||
|
@ -1176,15 +1177,16 @@ static void ab3550_mask(unsigned int irq)
|
||||||
schedule_work(&ab->mask_work);
|
schedule_work(&ab->mask_work);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ab3550_unmask(unsigned int irq)
|
static void ab3550_unmask(struct irq_data *data)
|
||||||
{
|
{
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
struct ab3550 *ab;
|
struct ab3550 *ab;
|
||||||
struct ab3550_platform_data *plf_data;
|
struct ab3550_platform_data *plf_data;
|
||||||
|
int irq;
|
||||||
|
|
||||||
ab = get_irq_chip_data(irq);
|
ab = irq_data_get_irq_chip_data(data);
|
||||||
plf_data = ab->i2c_client[0]->dev.platform_data;
|
plf_data = ab->i2c_client[0]->dev.platform_data;
|
||||||
irq -= plf_data->irq.base;
|
irq = data->irq - plf_data->irq.base;
|
||||||
|
|
||||||
spin_lock_irqsave(&ab->event_lock, flags);
|
spin_lock_irqsave(&ab->event_lock, flags);
|
||||||
ab->event_mask[irq / 8] &= ~BIT(irq % 8);
|
ab->event_mask[irq / 8] &= ~BIT(irq % 8);
|
||||||
|
@ -1193,20 +1195,16 @@ static void ab3550_unmask(unsigned int irq)
|
||||||
schedule_work(&ab->mask_work);
|
schedule_work(&ab->mask_work);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void noop(unsigned int irq)
|
static void noop(struct irq_data *data)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct irq_chip ab3550_irq_chip = {
|
static struct irq_chip ab3550_irq_chip = {
|
||||||
.name = "ab3550-core", /* Keep the same name as the request */
|
.name = "ab3550-core", /* Keep the same name as the request */
|
||||||
.startup = NULL, /* defaults to enable */
|
.irq_disable = ab3550_mask, /* No default to mask in chip.c */
|
||||||
.shutdown = NULL, /* defaults to disable */
|
.irq_ack = noop,
|
||||||
.enable = NULL, /* defaults to unmask */
|
.irq_mask = ab3550_mask,
|
||||||
.disable = ab3550_mask, /* No default to mask in chip.c */
|
.irq_unmask = ab3550_unmask,
|
||||||
.ack = noop,
|
|
||||||
.mask = ab3550_mask,
|
|
||||||
.unmask = ab3550_unmask,
|
|
||||||
.end = NULL,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ab_family_id {
|
struct ab_family_id {
|
||||||
|
|
Loading…
Reference in New Issue