mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
gpio: gpio-tegra: 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(). Signed-off-by: Russell King <[email protected]> Cc: Alexandre Courbot <[email protected]> Cc: Hans Ulli Kroll <[email protected]> Cc: Jason Cooper <[email protected]> Cc: Lee Jones <[email protected]> Cc: Linus Walleij <[email protected]> Cc: Thierry Reding <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
This commit is contained in:
parent
a44735f421
commit
e88d251d6a
1 changed files with 2 additions and 2 deletions
|
|
@ -515,8 +515,8 @@ static int tegra_gpio_probe(struct platform_device *pdev)
|
|||
for (i = 0; i < tegra_gpio_bank_count; i++) {
|
||||
bank = &tegra_gpio_banks[i];
|
||||
|
||||
irq_set_chained_handler(bank->irq, tegra_gpio_irq_handler);
|
||||
irq_set_handler_data(bank->irq, bank);
|
||||
irq_set_chained_handler_and_data(bank->irq,
|
||||
tegra_gpio_irq_handler, bank);
|
||||
|
||||
for (j = 0; j < 4; j++)
|
||||
spin_lock_init(&bank->lvl_lock[j]);
|
||||
|
|
|
|||
Loading…
Reference in a new issue