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

mfd: Convert max8925 to new irq_ API

The genirq infrastructure is being converted to pass struct irq_data rather
than an irq number to irq_chip operations, update max8925 to the new APIs.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>

authored by

Mark Brown and committed by
Samuel Ortiz
98d9bc13 5af3bde8

+15 -15
+15 -15
drivers/mfd/max8925-core.c
··· 407 407 return IRQ_HANDLED; 408 408 } 409 409 410 - static void max8925_irq_lock(unsigned int irq) 410 + static void max8925_irq_lock(struct irq_data *data) 411 411 { 412 - struct max8925_chip *chip = get_irq_chip_data(irq); 412 + struct max8925_chip *chip = irq_data_get_irq_chip_data(data); 413 413 414 414 mutex_lock(&chip->irq_lock); 415 415 } 416 416 417 - static void max8925_irq_sync_unlock(unsigned int irq) 417 + static void max8925_irq_sync_unlock(struct irq_data *data) 418 418 { 419 - struct max8925_chip *chip = get_irq_chip_data(irq); 419 + struct max8925_chip *chip = irq_data_get_irq_chip_data(data); 420 420 struct max8925_irq_data *irq_data; 421 421 static unsigned char cache_chg[2] = {0xff, 0xff}; 422 422 static unsigned char cache_on[2] = {0xff, 0xff}; ··· 492 492 mutex_unlock(&chip->irq_lock); 493 493 } 494 494 495 - static void max8925_irq_enable(unsigned int irq) 495 + static void max8925_irq_enable(struct irq_data *data) 496 496 { 497 - struct max8925_chip *chip = get_irq_chip_data(irq); 498 - max8925_irqs[irq - chip->irq_base].enable 499 - = max8925_irqs[irq - chip->irq_base].offs; 497 + struct max8925_chip *chip = irq_data_get_irq_chip_data(data); 498 + max8925_irqs[data->irq - chip->irq_base].enable 499 + = max8925_irqs[data->irq - chip->irq_base].offs; 500 500 } 501 501 502 - static void max8925_irq_disable(unsigned int irq) 502 + static void max8925_irq_disable(struct irq_data *data) 503 503 { 504 - struct max8925_chip *chip = get_irq_chip_data(irq); 505 - max8925_irqs[irq - chip->irq_base].enable = 0; 504 + struct max8925_chip *chip = irq_data_get_irq_chip_data(data); 505 + max8925_irqs[data->irq - chip->irq_base].enable = 0; 506 506 } 507 507 508 508 static struct irq_chip max8925_irq_chip = { 509 509 .name = "max8925", 510 - .bus_lock = max8925_irq_lock, 511 - .bus_sync_unlock = max8925_irq_sync_unlock, 512 - .enable = max8925_irq_enable, 513 - .disable = max8925_irq_disable, 510 + .irq_bus_lock = max8925_irq_lock, 511 + .irq_bus_sync_unlock = max8925_irq_sync_unlock, 512 + .irq_enable = max8925_irq_enable, 513 + .irq_disable = max8925_irq_disable, 514 514 }; 515 515 516 516 static int max8925_irq_init(struct max8925_chip *chip, int irq,