]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
soc: fsl: qe: Consolidate chained IRQ handler install/remove
authorChen Ni <nichen@iscas.ac.cn>
Thu, 15 May 2025 08:39:19 +0000 (16:39 +0800)
committerChristophe Leroy <christophe.leroy@csgroup.eu>
Sat, 17 May 2025 09:01:55 +0000 (11:01 +0200)
Chained irq handlers usually set up handler data as well.
irq_set_chained_handler_and_data() can set both under irq_desc->lock.
Replace the two calls with one.

Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
Link: https://lore.kernel.org/r/20250515083919.3811473-1-nichen@iscas.ac.cn
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
drivers/soc/fsl/qe/qe_ic.c

index 77bf0e83ffccc1e1e6050c3bc6b785deb032c768..bd74942c7374126f2685b2fcd0a6908ffbe5a830 100644 (file)
@@ -455,13 +455,11 @@ static int qe_ic_init(struct platform_device *pdev)
 
        qe_ic_write(qe_ic->regs, QEIC_CICR, 0);
 
-       irq_set_handler_data(qe_ic->virq_low, qe_ic);
-       irq_set_chained_handler(qe_ic->virq_low, low_handler);
+       irq_set_chained_handler_and_data(qe_ic->virq_low, low_handler, qe_ic);
 
-       if (high_handler) {
-               irq_set_handler_data(qe_ic->virq_high, qe_ic);
-               irq_set_chained_handler(qe_ic->virq_high, high_handler);
-       }
+       if (high_handler)
+               irq_set_chained_handler_and_data(qe_ic->virq_high,
+                                                high_handler, qe_ic);
        return 0;
 }
 static const struct of_device_id qe_ic_ids[] = {