mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
gpio/davinci: 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.
Reported-by: Russell King <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Cc: Julia Lawall <[email protected]>
Cc: Linus Walleij <[email protected]>
Cc: Alexandre Courbot <[email protected]>
This commit is contained in:
parent
01e2d0627a
commit
20483d04ae
1 changed files with 2 additions and 4 deletions
|
|
@ -578,15 +578,13 @@ static int davinci_gpio_irq_setup(struct platform_device *pdev)
|
|||
writel_relaxed(~0, &g->clr_falling);
|
||||
writel_relaxed(~0, &g->clr_rising);
|
||||
|
||||
/* set up all irqs in this bank */
|
||||
irq_set_chained_handler(bank_irq, gpio_irq_handler);
|
||||
|
||||
/*
|
||||
* Each chip handles 32 gpios, and each irq bank consists of 16
|
||||
* gpio irqs. Pass the irq bank's corresponding controller to
|
||||
* the chained irq handler.
|
||||
*/
|
||||
irq_set_handler_data(bank_irq, &chips[gpio / 32]);
|
||||
irq_set_chained_handler_and_data(bank_irq, gpio_irq_handler,
|
||||
&chips[gpio / 32]);
|
||||
|
||||
binten |= BIT(bank);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue