Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mfd: Convert tps6586x driver to new irq_ API

The genirq core is being updated to supply struct irq_data to irq_chip
operations rather than an irq number. Update the tps6586x driver to the
new APIs.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>

authored by

Mark Brown and committed by
Samuel Ortiz
96e824bd 01af22eb

+14 -14
+14 -14
drivers/mfd/tps6586x.c
··· 323 323 return device_for_each_child(tps6586x->dev, NULL, __remove_subdev); 324 324 } 325 325 326 - static void tps6586x_irq_lock(unsigned int irq) 326 + static void tps6586x_irq_lock(struct irq_data *data) 327 327 { 328 - struct tps6586x *tps6586x = get_irq_chip_data(irq); 328 + struct tps6586x *tps6586x = irq_data_get_irq_chip_data(data); 329 329 330 330 mutex_lock(&tps6586x->irq_lock); 331 331 } 332 332 333 - static void tps6586x_irq_enable(unsigned int irq) 333 + static void tps6586x_irq_enable(struct irq_data *irq_data) 334 334 { 335 - struct tps6586x *tps6586x = get_irq_chip_data(irq); 336 - unsigned int __irq = irq - tps6586x->irq_base; 335 + struct tps6586x *tps6586x = irq_data_get_irq_chip_data(irq_data); 336 + unsigned int __irq = irq_data->irq - tps6586x->irq_base; 337 337 const struct tps6586x_irq_data *data = &tps6586x_irqs[__irq]; 338 338 339 339 tps6586x->mask_reg[data->mask_reg] &= ~data->mask_mask; 340 340 tps6586x->irq_en |= (1 << __irq); 341 341 } 342 342 343 - static void tps6586x_irq_disable(unsigned int irq) 343 + static void tps6586x_irq_disable(struct irq_data *irq_data) 344 344 { 345 - struct tps6586x *tps6586x = get_irq_chip_data(irq); 345 + struct tps6586x *tps6586x = irq_data_get_irq_chip_data(irq_data); 346 346 347 - unsigned int __irq = irq - tps6586x->irq_base; 347 + unsigned int __irq = irq_data->irq - tps6586x->irq_base; 348 348 const struct tps6586x_irq_data *data = &tps6586x_irqs[__irq]; 349 349 350 350 tps6586x->mask_reg[data->mask_reg] |= data->mask_mask; 351 351 tps6586x->irq_en &= ~(1 << __irq); 352 352 } 353 353 354 - static void tps6586x_irq_sync_unlock(unsigned int irq) 354 + static void tps6586x_irq_sync_unlock(struct irq_data *data) 355 355 { 356 - struct tps6586x *tps6586x = get_irq_chip_data(irq); 356 + struct tps6586x *tps6586x = irq_data_get_irq_chip_data(data); 357 357 int i; 358 358 359 359 for (i = 0; i < ARRAY_SIZE(tps6586x->mask_reg); i++) { ··· 419 419 tps6586x->irq_base = irq_base; 420 420 421 421 tps6586x->irq_chip.name = "tps6586x"; 422 - tps6586x->irq_chip.enable = tps6586x_irq_enable; 423 - tps6586x->irq_chip.disable = tps6586x_irq_disable; 424 - tps6586x->irq_chip.bus_lock = tps6586x_irq_lock; 425 - tps6586x->irq_chip.bus_sync_unlock = tps6586x_irq_sync_unlock; 422 + tps6586x->irq_chip.irq_enable = tps6586x_irq_enable; 423 + tps6586x->irq_chip.irq_disable = tps6586x_irq_disable; 424 + tps6586x->irq_chip.irq_bus_lock = tps6586x_irq_lock; 425 + tps6586x->irq_chip.irq_bus_sync_unlock = tps6586x_irq_sync_unlock; 426 426 427 427 for (i = 0; i < ARRAY_SIZE(tps6586x_irqs); i++) { 428 428 int __irq = i + tps6586x->irq_base;