diff options
author | Colin Cross <ccross@google.com> | 2011-07-25 17:54:55 -0500 |
---|---|---|
committer | Nishanth Menon <nm@ti.com> | 2011-07-29 14:07:33 -0500 |
commit | a7da251a404d8528732fd9447ba3af69d89dafd7 (patch) | |
tree | 82ca598c98ce9dadae0c69be6e769f461a13468e /drivers/gpio | |
parent | 22e181efbe349f32c52fee680e0f4b6dbc93a182 (diff) | |
download | kernel_samsung_tuna-a7da251a404d8528732fd9447ba3af69d89dafd7.zip kernel_samsung_tuna-a7da251a404d8528732fd9447ba3af69d89dafd7.tar.gz kernel_samsung_tuna-a7da251a404d8528732fd9447ba3af69d89dafd7.tar.bz2 |
GPIO: OMAP: use put_sync_suspend instead of put_sync in irq handler.
GPIO uses put_sync in irq handler at the moment, this causes the following
warning with a check patch such as https://patchwork.kernel.org/patch/1001572/:
[ 4.036560] BUG: sleeping function called from invalid context at drivers/base/power/runtime.c:735
[ 4.046508] in_atomic(): 1, irqs_disabled(): 128, pid: 1, name: swapper
[ 4.053863] Backtrace:
[ 4.056762] [<c00508d0>] (dump_backtrace+0x0/0x10c) from [<c0533870>] (dump_stack+0x18/0x1c)
[ 4.066131] r7:00000000 r6:ffff6c05 r5:c06ce080 r4:de43a000
[ 4.072784] [<c0533858>] (dump_stack+0x0/0x1c) from [<c0079744>] (__might_sleep+0x108/0x128)
[ 4.082183] [<c007963c>] (__might_sleep+0x0/0x128) from [<c027b824>] (__pm_runtime_idle+0x90/0x98)
[ 4.092132] r6:c06d0720 r5:00000004 r4:de486808
[ 4.097534] [<c027b794>] (__pm_runtime_idle+0x0/0x98) from [<c0204ce0>] (gpio_irq_handler+0x1e8/0x270)
[ 4.107849] r7:00000000 r6:c06d0720 r5:c06e7220 r4:de474000
[ 4.114501] [<c0204af8>] (gpio_irq_handler+0x0/0x270) from [<c00cc570>] (generic_handle_irq+0x3c/0x48)
[ 4.124847] [<c00cc534>] (generic_handle_irq+0x0/0x48) from [<c0046054>] (asm_do_IRQ+0x54/0xb4)
[ 4.134521] [<c0046000>] (asm_do_IRQ+0x0/0xb4) from [<c004c448>] (__irq_svc+0x48/0xe0)
Instead, use put_sync_suspend and since the gpio devices are already marked as
used in irq enabled case, the change removes a potential invalid condition.
Acked-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Colin Cross <ccross@google.com>
Diffstat (limited to 'drivers/gpio')
-rw-r--r-- | drivers/gpio/gpio-omap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c index 82abef0..5aa0e19 100644 --- a/drivers/gpio/gpio-omap.c +++ b/drivers/gpio/gpio-omap.c @@ -677,7 +677,7 @@ exit: if (!unmasked) chained_irq_exit(chip, desc); - pm_runtime_put_sync(bank->dev); + pm_runtime_put_sync_suspend(bank->dev); } static void gpio_irq_shutdown(struct irq_data *d) |