diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-12-11 11:44:11 -0500 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2011-01-14 06:37:55 -0500 |
commit | e6a4c4a48a80ddfaa5abf59146e0beb5faa86fba (patch) | |
tree | 7b4a3d0fa7c6ac7da5b050435454f8599430f743 /drivers/mfd/htc-i2cpld.c | |
parent | 949b9decaed059f25ed9639d3dbfe839972cf01b (diff) |
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.c | 30 |
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 { | |||
82 | /* There does not appear to be a way to proactively mask interrupts | 82 | /* There does not appear to be a way to proactively mask interrupts |
83 | * on the htcpld chip itself. So, we simply ignore interrupts that | 83 | * on the htcpld chip itself. So, we simply ignore interrupts that |
84 | * aren't desired. */ | 84 | * aren't desired. */ |
85 | static void htcpld_mask(unsigned int irq) | 85 | static void htcpld_mask(struct irq_data *data) |
86 | { | 86 | { |
87 | struct htcpld_chip *chip = get_irq_chip_data(irq); | 87 | struct htcpld_chip *chip = irq_data_get_irq_chip_data(data); |
88 | chip->irqs_enabled &= ~(1 << (irq - chip->irq_start)); | 88 | chip->irqs_enabled &= ~(1 << (data->irq - chip->irq_start)); |
89 | pr_debug("HTCPLD mask %d %04x\n", irq, chip->irqs_enabled); | 89 | pr_debug("HTCPLD mask %d %04x\n", data->irq, chip->irqs_enabled); |
90 | } | 90 | } |
91 | static void htcpld_unmask(unsigned int irq) | 91 | static void htcpld_unmask(struct irq_data *data) |
92 | { | 92 | { |
93 | struct htcpld_chip *chip = get_irq_chip_data(irq); | 93 | struct htcpld_chip *chip = irq_data_get_irq_chip_data(data); |
94 | chip->irqs_enabled |= 1 << (irq - chip->irq_start); | 94 | chip->irqs_enabled |= 1 << (data->irq - chip->irq_start); |
95 | pr_debug("HTCPLD unmask %d %04x\n", irq, chip->irqs_enabled); | 95 | pr_debug("HTCPLD unmask %d %04x\n", data->irq, chip->irqs_enabled); |
96 | } | 96 | } |
97 | 97 | ||
98 | static int htcpld_set_type(unsigned int irq, unsigned int flags) | 98 | static int htcpld_set_type(struct irq_data *data, unsigned int flags) |
99 | { | 99 | { |
100 | struct irq_desc *d = irq_to_desc(irq); | 100 | struct irq_desc *d = irq_to_desc(data->irq); |
101 | 101 | ||
102 | if (!d) { | 102 | if (!d) { |
103 | pr_err("HTCPLD invalid IRQ: %d\n", irq); | 103 | pr_err("HTCPLD invalid IRQ: %d\n", data->irq); |
104 | return -EINVAL; | 104 | return -EINVAL; |
105 | } | 105 | } |
106 | 106 | ||
@@ -118,10 +118,10 @@ static int htcpld_set_type(unsigned int irq, unsigned int flags) | |||
118 | } | 118 | } |
119 | 119 | ||
120 | static struct irq_chip htcpld_muxed_chip = { | 120 | static struct irq_chip htcpld_muxed_chip = { |
121 | .name = "htcpld", | 121 | .name = "htcpld", |
122 | .mask = htcpld_mask, | 122 | .irq_mask = htcpld_mask, |
123 | .unmask = htcpld_unmask, | 123 | .irq_unmask = htcpld_unmask, |
124 | .set_type = htcpld_set_type, | 124 | .irq_set_type = htcpld_set_type, |
125 | }; | 125 | }; |
126 | 126 | ||
127 | /* To properly dispatch IRQ events, we need to read from the | 127 | /* To properly dispatch IRQ events, we need to read from the |