aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/ab8500-core.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2010-12-11 08:16:08 -0500
committerSamuel Ortiz <sameo@linux.intel.com>2011-01-14 06:37:53 -0500
commit9505a0a0ac6160480eaab8d592dce6161e67e05d (patch)
tree7dfd62731189a69faa13915d2987e0694899473d /drivers/mfd/ab8500-core.c
parentc91ad349d084f8c034ff60fb56d41a9667f71ae4 (diff)
mfd: Convert AB8500 to new irq_ methods
The genirq core is being converted to supply struct irq_data to chips rather than the interrupt number. 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>
Diffstat (limited to 'drivers/mfd/ab8500-core.c')
-rw-r--r--drivers/mfd/ab8500-core.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/mfd/ab8500-core.c b/drivers/mfd/ab8500-core.c
index 7f01a3a1d10f..86cc8874e6de 100644
--- a/drivers/mfd/ab8500-core.c
+++ b/drivers/mfd/ab8500-core.c
@@ -232,16 +232,16 @@ static struct abx500_ops ab8500_ops = {
232 .startup_irq_enabled = NULL, 232 .startup_irq_enabled = NULL,
233}; 233};
234 234
235static void ab8500_irq_lock(unsigned int irq) 235static void ab8500_irq_lock(struct irq_data *data)
236{ 236{
237 struct ab8500 *ab8500 = get_irq_chip_data(irq); 237 struct ab8500 *ab8500 = irq_data_get_irq_chip_data(data);
238 238
239 mutex_lock(&ab8500->irq_lock); 239 mutex_lock(&ab8500->irq_lock);
240} 240}
241 241
242static void ab8500_irq_sync_unlock(unsigned int irq) 242static void ab8500_irq_sync_unlock(struct irq_data *data)
243{ 243{
244 struct ab8500 *ab8500 = get_irq_chip_data(irq); 244 struct ab8500 *ab8500 = irq_data_get_irq_chip_data(data);
245 int i; 245 int i;
246 246
247 for (i = 0; i < AB8500_NUM_IRQ_REGS; i++) { 247 for (i = 0; i < AB8500_NUM_IRQ_REGS; i++) {
@@ -261,20 +261,20 @@ static void ab8500_irq_sync_unlock(unsigned int irq)
261 mutex_unlock(&ab8500->irq_lock); 261 mutex_unlock(&ab8500->irq_lock);
262} 262}
263 263
264static void ab8500_irq_mask(unsigned int irq) 264static void ab8500_irq_mask(struct irq_data *data)
265{ 265{
266 struct ab8500 *ab8500 = get_irq_chip_data(irq); 266 struct ab8500 *ab8500 = irq_data_get_irq_chip_data(data);
267 int offset = irq - ab8500->irq_base; 267 int offset = data->irq - ab8500->irq_base;
268 int index = offset / 8; 268 int index = offset / 8;
269 int mask = 1 << (offset % 8); 269 int mask = 1 << (offset % 8);
270 270
271 ab8500->mask[index] |= mask; 271 ab8500->mask[index] |= mask;
272} 272}
273 273
274static void ab8500_irq_unmask(unsigned int irq) 274static void ab8500_irq_unmask(struct irq_data *data)
275{ 275{
276 struct ab8500 *ab8500 = get_irq_chip_data(irq); 276 struct ab8500 *ab8500 = irq_data_get_irq_chip_data(data);
277 int offset = irq - ab8500->irq_base; 277 int offset = data->irq - ab8500->irq_base;
278 int index = offset / 8; 278 int index = offset / 8;
279 int mask = 1 << (offset % 8); 279 int mask = 1 << (offset % 8);
280 280
@@ -283,10 +283,10 @@ static void ab8500_irq_unmask(unsigned int irq)
283 283
284static struct irq_chip ab8500_irq_chip = { 284static struct irq_chip ab8500_irq_chip = {
285 .name = "ab8500", 285 .name = "ab8500",
286 .bus_lock = ab8500_irq_lock, 286 .irq_bus_lock = ab8500_irq_lock,
287 .bus_sync_unlock = ab8500_irq_sync_unlock, 287 .irq_bus_sync_unlock = ab8500_irq_sync_unlock,
288 .mask = ab8500_irq_mask, 288 .irq_mask = ab8500_irq_mask,
289 .unmask = ab8500_irq_unmask, 289 .irq_unmask = ab8500_irq_unmask,
290}; 290};
291 291
292static irqreturn_t ab8500_irq(int irq, void *dev) 292static irqreturn_t ab8500_irq(int irq, void *dev)