summaryrefslogtreecommitdiffstats
path: root/drivers/mfd/htc-i2cpld.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2010-12-11 16:44:11 +0000
committerSamuel Ortiz <sameo@linux.intel.com>2011-01-14 12:37:55 +0100
commite6a4c4a48a80ddfaa5abf59146e0beb5faa86fba (patch)
tree7b4a3d0fa7c6ac7da5b050435454f8599430f743 /drivers/mfd/htc-i2cpld.c
parent949b9decaed059f25ed9639d3dbfe839972cf01b (diff)
downloadlinux-stable-e6a4c4a48a80ddfaa5abf59146e0beb5faa86fba.tar.gz
linux-stable-e6a4c4a48a80ddfaa5abf59146e0beb5faa86fba.tar.bz2
linux-stable-e6a4c4a48a80ddfaa5abf59146e0beb5faa86fba.zip
mfd: Convert HTC I2C CPLD driver to irq_ API
The genirq core is being converted to pass a struct irq_data to interrupt operations rather than an IRQ number. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Cory Maccarrone <darkstar6262@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/htc-i2cpld.c')
-rw-r--r--drivers/mfd/htc-i2cpld.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/mfd/htc-i2cpld.c b/drivers/mfd/htc-i2cpld.c
index dd24355c9650..296ad1562f69 100644
--- a/drivers/mfd/htc-i2cpld.c
+++ b/drivers/mfd/htc-i2cpld.c
@@ -82,25 +82,25 @@ struct htcpld_data {
/* There does not appear to be a way to proactively mask interrupts
* on the htcpld chip itself. So, we simply ignore interrupts that
* aren't desired. */
-static void htcpld_mask(unsigned int irq)
+static void htcpld_mask(struct irq_data *data)
{
- struct htcpld_chip *chip = get_irq_chip_data(irq);
- chip->irqs_enabled &= ~(1 << (irq - chip->irq_start));
- pr_debug("HTCPLD mask %d %04x\n", irq, chip->irqs_enabled);
+ struct htcpld_chip *chip = irq_data_get_irq_chip_data(data);
+ chip->irqs_enabled &= ~(1 << (data->irq - chip->irq_start));
+ pr_debug("HTCPLD mask %d %04x\n", data->irq, chip->irqs_enabled);
}
-static void htcpld_unmask(unsigned int irq)
+static void htcpld_unmask(struct irq_data *data)
{
- struct htcpld_chip *chip = get_irq_chip_data(irq);
- chip->irqs_enabled |= 1 << (irq - chip->irq_start);
- pr_debug("HTCPLD unmask %d %04x\n", irq, chip->irqs_enabled);
+ struct htcpld_chip *chip = irq_data_get_irq_chip_data(data);
+ chip->irqs_enabled |= 1 << (data->irq - chip->irq_start);
+ pr_debug("HTCPLD unmask %d %04x\n", data->irq, chip->irqs_enabled);
}
-static int htcpld_set_type(unsigned int irq, unsigned int flags)
+static int htcpld_set_type(struct irq_data *data, unsigned int flags)
{
- struct irq_desc *d = irq_to_desc(irq);
+ struct irq_desc *d = irq_to_desc(data->irq);
if (!d) {
- pr_err("HTCPLD invalid IRQ: %d\n", irq);
+ pr_err("HTCPLD invalid IRQ: %d\n", data->irq);
return -EINVAL;
}
@@ -118,10 +118,10 @@ static int htcpld_set_type(unsigned int irq, unsigned int flags)
}
static struct irq_chip htcpld_muxed_chip = {
- .name = "htcpld",
- .mask = htcpld_mask,
- .unmask = htcpld_unmask,
- .set_type = htcpld_set_type,
+ .name = "htcpld",
+ .irq_mask = htcpld_mask,
+ .irq_unmask = htcpld_unmask,
+ .irq_set_type = htcpld_set_type,
};
/* To properly dispatch IRQ events, we need to read from the