diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-12-11 13:31:03 -0500 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2011-01-14 06:38:01 -0500 |
commit | 2898577e160c7d60d2b11cb3b1c3b55d0e1468db (patch) | |
tree | a5fc93c1833b803bca67925d1b9aaf4d9e81adaf /drivers/mfd/max8998-irq.c | |
parent | 98d9bc13cd19e544e8ea15b97f5cfef166cc9294 (diff) |
mfd: Convert MAX8998 driver to irq_ API
The genirq core is being updated to pass struct irq_data to interrupt
operations, update the MAX8998 driver to the new API.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/max8998-irq.c')
-rw-r--r-- | drivers/mfd/max8998-irq.c | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/drivers/mfd/max8998-irq.c b/drivers/mfd/max8998-irq.c index 45bfe77b639b..c6b61fcc5808 100644 --- a/drivers/mfd/max8998-irq.c +++ b/drivers/mfd/max8998-irq.c | |||
@@ -102,16 +102,16 @@ irq_to_max8998_irq(struct max8998_dev *max8998, int irq) | |||
102 | return &max8998_irqs[irq - max8998->irq_base]; | 102 | return &max8998_irqs[irq - max8998->irq_base]; |
103 | } | 103 | } |
104 | 104 | ||
105 | static void max8998_irq_lock(unsigned int irq) | 105 | static void max8998_irq_lock(struct irq_data *data) |
106 | { | 106 | { |
107 | struct max8998_dev *max8998 = get_irq_chip_data(irq); | 107 | struct max8998_dev *max8998 = irq_data_get_irq_chip_data(data); |
108 | 108 | ||
109 | mutex_lock(&max8998->irqlock); | 109 | mutex_lock(&max8998->irqlock); |
110 | } | 110 | } |
111 | 111 | ||
112 | static void max8998_irq_sync_unlock(unsigned int irq) | 112 | static void max8998_irq_sync_unlock(struct irq_data *data) |
113 | { | 113 | { |
114 | struct max8998_dev *max8998 = get_irq_chip_data(irq); | 114 | struct max8998_dev *max8998 = irq_data_get_irq_chip_data(data); |
115 | int i; | 115 | int i; |
116 | 116 | ||
117 | for (i = 0; i < ARRAY_SIZE(max8998->irq_masks_cur); i++) { | 117 | for (i = 0; i < ARRAY_SIZE(max8998->irq_masks_cur); i++) { |
@@ -129,28 +129,30 @@ static void max8998_irq_sync_unlock(unsigned int irq) | |||
129 | mutex_unlock(&max8998->irqlock); | 129 | mutex_unlock(&max8998->irqlock); |
130 | } | 130 | } |
131 | 131 | ||
132 | static void max8998_irq_unmask(unsigned int irq) | 132 | static void max8998_irq_unmask(struct irq_data *data) |
133 | { | 133 | { |
134 | struct max8998_dev *max8998 = get_irq_chip_data(irq); | 134 | struct max8998_dev *max8998 = irq_data_get_irq_chip_data(data); |
135 | struct max8998_irq_data *irq_data = irq_to_max8998_irq(max8998, irq); | 135 | struct max8998_irq_data *irq_data = irq_to_max8998_irq(max8998, |
136 | data->irq); | ||
136 | 137 | ||
137 | max8998->irq_masks_cur[irq_data->reg - 1] &= ~irq_data->mask; | 138 | max8998->irq_masks_cur[irq_data->reg - 1] &= ~irq_data->mask; |
138 | } | 139 | } |
139 | 140 | ||
140 | static void max8998_irq_mask(unsigned int irq) | 141 | static void max8998_irq_mask(struct irq_data *data) |
141 | { | 142 | { |
142 | struct max8998_dev *max8998 = get_irq_chip_data(irq); | 143 | struct max8998_dev *max8998 = irq_data_get_irq_chip_data(data); |
143 | struct max8998_irq_data *irq_data = irq_to_max8998_irq(max8998, irq); | 144 | struct max8998_irq_data *irq_data = irq_to_max8998_irq(max8998, |
145 | data->irq); | ||
144 | 146 | ||
145 | max8998->irq_masks_cur[irq_data->reg - 1] |= irq_data->mask; | 147 | max8998->irq_masks_cur[irq_data->reg - 1] |= irq_data->mask; |
146 | } | 148 | } |
147 | 149 | ||
148 | static struct irq_chip max8998_irq_chip = { | 150 | static struct irq_chip max8998_irq_chip = { |
149 | .name = "max8998", | 151 | .name = "max8998", |
150 | .bus_lock = max8998_irq_lock, | 152 | .irq_bus_lock = max8998_irq_lock, |
151 | .bus_sync_unlock = max8998_irq_sync_unlock, | 153 | .irq_bus_sync_unlock = max8998_irq_sync_unlock, |
152 | .mask = max8998_irq_mask, | 154 | .irq_mask = max8998_irq_mask, |
153 | .unmask = max8998_irq_unmask, | 155 | .irq_unmask = max8998_irq_unmask, |
154 | }; | 156 | }; |
155 | 157 | ||
156 | static irqreturn_t max8998_irq_thread(int irq, void *data) | 158 | static irqreturn_t max8998_irq_thread(int irq, void *data) |