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

irqchip/imx-intmux: Move PM device over to irq domain

Move the reference to the device over to the irq domain.
This allows the irq_chip structure to be directly used instead
of taking a copy for each instance.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: Bartosz Golaszewski <brgl@bgdev.pl>
Link: https://lore.kernel.org/r/20220201120310.878267-6-maz@kernel.org

+3 -5
+3 -5
drivers/irqchip/irq-imx-intmux.c
··· 61 61 #define CHAN_MAX_NUM 0x8 62 62 63 63 struct intmux_irqchip_data { 64 - struct irq_chip chip; 65 64 u32 saved_reg; 66 65 int chanidx; 67 66 int irq; ··· 113 114 raw_spin_unlock_irqrestore(&data->lock, flags); 114 115 } 115 116 116 - static struct irq_chip imx_intmux_irq_chip = { 117 + static struct irq_chip imx_intmux_irq_chip __ro_after_init = { 117 118 .name = "intmux", 118 119 .irq_mask = imx_intmux_irq_mask, 119 120 .irq_unmask = imx_intmux_irq_unmask, ··· 125 126 struct intmux_irqchip_data *data = h->host_data; 126 127 127 128 irq_set_chip_data(irq, data); 128 - irq_set_chip_and_handler(irq, &data->chip, handle_level_irq); 129 + irq_set_chip_and_handler(irq, &imx_intmux_irq_chip, handle_level_irq); 129 130 130 131 return 0; 131 132 } ··· 240 241 } 241 242 242 243 for (i = 0; i < channum; i++) { 243 - data->irqchip_data[i].chip = imx_intmux_irq_chip; 244 - data->irqchip_data[i].chip.parent_device = &pdev->dev; 245 244 data->irqchip_data[i].chanidx = i; 246 245 247 246 data->irqchip_data[i].irq = irq_of_parse_and_map(np, i); ··· 257 260 goto out; 258 261 } 259 262 data->irqchip_data[i].domain = domain; 263 + irq_domain_set_pm_device(domain, &pdev->dev); 260 264 261 265 /* disable all interrupt sources of this channel firstly */ 262 266 writel_relaxed(0, data->regs + CHANIER(i));