diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-12-11 11:43:59 -0500 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2011-01-14 06:37:54 -0500 |
commit | 949b9decaed059f25ed9639d3dbfe839972cf01b (patch) | |
tree | 3f2667574046496b3ddd42e7af9a8c3489c05174 /drivers/mfd/htc-egpio.c | |
parent | c232f22fc6aac1797d0ca9beddddf0fea4beb7f3 (diff) |
mfd: Convert HTC EGPIO 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>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/htc-egpio.c')
-rw-r--r-- | drivers/mfd/htc-egpio.c | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/drivers/mfd/htc-egpio.c b/drivers/mfd/htc-egpio.c index d3e74f8585e0..d00b6d1a69e5 100644 --- a/drivers/mfd/htc-egpio.c +++ b/drivers/mfd/htc-egpio.c | |||
@@ -70,31 +70,32 @@ static inline void ack_irqs(struct egpio_info *ei) | |||
70 | ei->ack_write, ei->ack_register << ei->bus_shift); | 70 | ei->ack_write, ei->ack_register << ei->bus_shift); |
71 | } | 71 | } |
72 | 72 | ||
73 | static void egpio_ack(unsigned int irq) | 73 | static void egpio_ack(struct irq_data *data) |
74 | { | 74 | { |
75 | } | 75 | } |
76 | 76 | ||
77 | /* There does not appear to be a way to proactively mask interrupts | 77 | /* There does not appear to be a way to proactively mask interrupts |
78 | * on the egpio chip itself. So, we simply ignore interrupts that | 78 | * on the egpio chip itself. So, we simply ignore interrupts that |
79 | * aren't desired. */ | 79 | * aren't desired. */ |
80 | static void egpio_mask(unsigned int irq) | 80 | static void egpio_mask(struct irq_data *data) |
81 | { | 81 | { |
82 | struct egpio_info *ei = get_irq_chip_data(irq); | 82 | struct egpio_info *ei = irq_data_get_irq_chip_data(data); |
83 | ei->irqs_enabled &= ~(1 << (irq - ei->irq_start)); | 83 | ei->irqs_enabled &= ~(1 << (data->irq - ei->irq_start)); |
84 | pr_debug("EGPIO mask %d %04x\n", irq, ei->irqs_enabled); | 84 | pr_debug("EGPIO mask %d %04x\n", data->irq, ei->irqs_enabled); |
85 | } | 85 | } |
86 | static void egpio_unmask(unsigned int irq) | 86 | |
87 | static void egpio_unmask(struct irq_data *data) | ||
87 | { | 88 | { |
88 | struct egpio_info *ei = get_irq_chip_data(irq); | 89 | struct egpio_info *ei = irq_data_get_irq_chip_data(data); |
89 | ei->irqs_enabled |= 1 << (irq - ei->irq_start); | 90 | ei->irqs_enabled |= 1 << (data->irq - ei->irq_start); |
90 | pr_debug("EGPIO unmask %d %04x\n", irq, ei->irqs_enabled); | 91 | pr_debug("EGPIO unmask %d %04x\n", data->irq, ei->irqs_enabled); |
91 | } | 92 | } |
92 | 93 | ||
93 | static struct irq_chip egpio_muxed_chip = { | 94 | static struct irq_chip egpio_muxed_chip = { |
94 | .name = "htc-egpio", | 95 | .name = "htc-egpio", |
95 | .ack = egpio_ack, | 96 | .irq_ack = egpio_ack, |
96 | .mask = egpio_mask, | 97 | .irq_mask = egpio_mask, |
97 | .unmask = egpio_unmask, | 98 | .irq_unmask = egpio_unmask, |
98 | }; | 99 | }; |
99 | 100 | ||
100 | static void egpio_handler(unsigned int irq, struct irq_desc *desc) | 101 | static void egpio_handler(unsigned int irq, struct irq_desc *desc) |