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

mfd: Convert HTC I2C CPLD 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>
Acked-by: Cory Maccarrone <darkstar6262@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>

authored by

Mark Brown and committed by
Samuel Ortiz
e6a4c4a4 949b9dec

+15 -15
+15 -15
drivers/mfd/htc-i2cpld.c
··· 82 82 /* There does not appear to be a way to proactively mask interrupts 83 83 * on the htcpld chip itself. So, we simply ignore interrupts that 84 84 * aren't desired. */ 85 - static void htcpld_mask(unsigned int irq) 85 + static void htcpld_mask(struct irq_data *data) 86 86 { 87 - struct htcpld_chip *chip = get_irq_chip_data(irq); 88 - chip->irqs_enabled &= ~(1 << (irq - chip->irq_start)); 89 - pr_debug("HTCPLD mask %d %04x\n", irq, chip->irqs_enabled); 87 + struct htcpld_chip *chip = irq_data_get_irq_chip_data(data); 88 + chip->irqs_enabled &= ~(1 << (data->irq - chip->irq_start)); 89 + pr_debug("HTCPLD mask %d %04x\n", data->irq, chip->irqs_enabled); 90 90 } 91 - static void htcpld_unmask(unsigned int irq) 91 + static void htcpld_unmask(struct irq_data *data) 92 92 { 93 - struct htcpld_chip *chip = get_irq_chip_data(irq); 94 - chip->irqs_enabled |= 1 << (irq - chip->irq_start); 95 - pr_debug("HTCPLD unmask %d %04x\n", irq, chip->irqs_enabled); 93 + struct htcpld_chip *chip = irq_data_get_irq_chip_data(data); 94 + chip->irqs_enabled |= 1 << (data->irq - chip->irq_start); 95 + pr_debug("HTCPLD unmask %d %04x\n", data->irq, chip->irqs_enabled); 96 96 } 97 97 98 - static int htcpld_set_type(unsigned int irq, unsigned int flags) 98 + static int htcpld_set_type(struct irq_data *data, unsigned int flags) 99 99 { 100 - struct irq_desc *d = irq_to_desc(irq); 100 + struct irq_desc *d = irq_to_desc(data->irq); 101 101 102 102 if (!d) { 103 - pr_err("HTCPLD invalid IRQ: %d\n", irq); 103 + pr_err("HTCPLD invalid IRQ: %d\n", data->irq); 104 104 return -EINVAL; 105 105 } 106 106 ··· 118 118 } 119 119 120 120 static struct irq_chip htcpld_muxed_chip = { 121 - .name = "htcpld", 122 - .mask = htcpld_mask, 123 - .unmask = htcpld_unmask, 124 - .set_type = htcpld_set_type, 121 + .name = "htcpld", 122 + .irq_mask = htcpld_mask, 123 + .irq_unmask = htcpld_unmask, 124 + .irq_set_type = htcpld_set_type, 125 125 }; 126 126 127 127 /* To properly dispatch IRQ events, we need to read from the