pinctrl/samsung: Fix race in installing chained IRQ handler
pinctrl/samsung: Fix race in installing chained IRQ handler

Fix a race where a pending interrupt could be received and the handler
called before the handler's data has been setup, by converting to
irq_set_chained_handler_and_data().

Search and conversion was done with coccinelle:

@@
expression E1, E2, E3;
@@
(
-if (irq_set_chained_handler(E1, E3) != 0)
-   BUG();
|
-irq_set_chained_handler(E1, E3);
)
-irq_set_handler_data(E1, E2);
+irq_set_chained_handler_and_data(E1, E3, E2);

@@
expression E1, E2, E3;
@@
(
-if (irq_set_chained_handler(E1, E3) != 0)
-   BUG();
...
|
-irq_set_chained_handler(E1, E3);
...
)
-irq_set_handler_data(E1, E2);
+irq_set_chained_handler_and_data(E1, E3, E2);

Reported-by: Russell King <f6aa0246ff943bfa8602cdf60d40c481b38ed232@arm.linux.org.uk>
Signed-off-by: Thomas Gleixner <00e4cf8f46a57000a44449bf9dd8cbbcc209fd2a@linutronix.de>
Cc: Julia Lawall <3d4a3affaf9163789962e9770780389962bda29d@lip6.fr>
Cc: Tomasz Figa <69861c78e6f8ec8c6fbfd1c06050c87cda6b23eb@gmail.com>
Cc: Thomas Abraham <f8cb4d3099c555ac2fa0712396a78d2cd666d4bd@linaro.org>
Cc: Linus Walleij <9cd9d802d23c0ed5e224beabf4ae4a5c478746ef@linaro.org>
Cc: f99ef57ccac738b558d0fc2e44478b3c5def9522@lists.infradead.org
Cc: 1a9f72c116dc2e35f3173311beed1d8308bd06ce@vger.kernel.org
Cc: 566578396a3687944c2f0ec2d93d3fcd41719bb0@vger.kernel.org

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs