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

mfd: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc

Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc while we
already have a pointer to corresponding irq_desc.

Do the same change to avoid the pattern "irq_get_chip_data(data->irq)".

Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>

authored by

Jiang Liu and committed by
Lee Jones
1e84aa44 079140f5

+12 -12
+1 -1
drivers/mfd/ezx-pcap.c
··· 207 207 208 208 static void pcap_irq_handler(unsigned int irq, struct irq_desc *desc) 209 209 { 210 - struct pcap_chip *pcap = irq_get_handler_data(irq); 210 + struct pcap_chip *pcap = irq_desc_get_handler_data(desc); 211 211 212 212 desc->irq_data.chip->irq_ack(&desc->irq_data); 213 213 queue_work(pcap->workqueue, &pcap->isr_work);
+4 -4
drivers/mfd/max8997-irq.c
··· 113 113 114 114 static void max8997_irq_lock(struct irq_data *data) 115 115 { 116 - struct max8997_dev *max8997 = irq_get_chip_data(data->irq); 116 + struct max8997_dev *max8997 = irq_data_get_irq_chip_data(data); 117 117 118 118 mutex_lock(&max8997->irqlock); 119 119 } 120 120 121 121 static void max8997_irq_sync_unlock(struct irq_data *data) 122 122 { 123 - struct max8997_dev *max8997 = irq_get_chip_data(data->irq); 123 + struct max8997_dev *max8997 = irq_data_get_irq_chip_data(data); 124 124 int i; 125 125 126 126 for (i = 0; i < MAX8997_IRQ_GROUP_NR; i++) { ··· 148 148 149 149 static void max8997_irq_mask(struct irq_data *data) 150 150 { 151 - struct max8997_dev *max8997 = irq_get_chip_data(data->irq); 151 + struct max8997_dev *max8997 = irq_data_get_irq_chip_data(data); 152 152 const struct max8997_irq_data *irq_data = irq_to_max8997_irq(max8997, 153 153 data->irq); 154 154 ··· 157 157 158 158 static void max8997_irq_unmask(struct irq_data *data) 159 159 { 160 - struct max8997_dev *max8997 = irq_get_chip_data(data->irq); 160 + struct max8997_dev *max8997 = irq_data_get_irq_chip_data(data); 161 161 const struct max8997_irq_data *irq_data = irq_to_max8997_irq(max8997, 162 162 data->irq); 163 163
+4 -4
drivers/mfd/mt6397-core.c
··· 60 60 61 61 static void mt6397_irq_lock(struct irq_data *data) 62 62 { 63 - struct mt6397_chip *mt6397 = irq_get_chip_data(data->irq); 63 + struct mt6397_chip *mt6397 = irq_data_get_irq_chip_data(data); 64 64 65 65 mutex_lock(&mt6397->irqlock); 66 66 } 67 67 68 68 static void mt6397_irq_sync_unlock(struct irq_data *data) 69 69 { 70 - struct mt6397_chip *mt6397 = irq_get_chip_data(data->irq); 70 + struct mt6397_chip *mt6397 = irq_data_get_irq_chip_data(data); 71 71 72 72 regmap_write(mt6397->regmap, MT6397_INT_CON0, mt6397->irq_masks_cur[0]); 73 73 regmap_write(mt6397->regmap, MT6397_INT_CON1, mt6397->irq_masks_cur[1]); ··· 77 77 78 78 static void mt6397_irq_disable(struct irq_data *data) 79 79 { 80 - struct mt6397_chip *mt6397 = irq_get_chip_data(data->irq); 80 + struct mt6397_chip *mt6397 = irq_data_get_irq_chip_data(data); 81 81 int shift = data->hwirq & 0xf; 82 82 int reg = data->hwirq >> 4; 83 83 ··· 86 86 87 87 static void mt6397_irq_enable(struct irq_data *data) 88 88 { 89 - struct mt6397_chip *mt6397 = irq_get_chip_data(data->irq); 89 + struct mt6397_chip *mt6397 = irq_data_get_irq_chip_data(data); 90 90 int shift = data->hwirq & 0xf; 91 91 int reg = data->hwirq >> 4; 92 92
+1 -1
drivers/mfd/t7l66xb.c
··· 187 187 /* Handle the T7L66XB interrupt mux */ 188 188 static void t7l66xb_irq(unsigned int irq, struct irq_desc *desc) 189 189 { 190 - struct t7l66xb *t7l66xb = irq_get_handler_data(irq); 190 + struct t7l66xb *t7l66xb = irq_desc_get_handler_data(desc); 191 191 unsigned int isr; 192 192 unsigned int i, irq_base; 193 193
+1 -1
drivers/mfd/tc6393xb.c
··· 525 525 static void 526 526 tc6393xb_irq(unsigned int irq, struct irq_desc *desc) 527 527 { 528 - struct tc6393xb *tc6393xb = irq_get_handler_data(irq); 528 + struct tc6393xb *tc6393xb = irq_desc_get_handler_data(desc); 529 529 unsigned int isr; 530 530 unsigned int i, irq_base; 531 531
+1 -1
drivers/mfd/twl6030-irq.c
··· 231 231 232 232 static int twl6030_irq_set_wake(struct irq_data *d, unsigned int on) 233 233 { 234 - struct twl6030_irq *pdata = irq_get_chip_data(d->irq); 234 + struct twl6030_irq *pdata = irq_data_get_irq_chip_data(d); 235 235 236 236 if (on) 237 237 atomic_inc(&pdata->wakeirqs);