aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio
diff options
context:
space:
mode:
authorMiguel Vadillo <vadillo@ti.com>2011-10-19 14:29:45 -0500
committerMiguel Vadillo <vadillo@ti.com>2011-10-19 14:50:44 -0500
commite9f3f9a985914d2d15c794a5fbaf3b13ea9dc3db (patch)
treeaa0508c07839cba446be4b867d25bb8362a6875d /drivers/gpio
parente43cfabdaa8dd4a186a7084e910bd1d39b60ff8f (diff)
downloadkernel_samsung_tuna-e9f3f9a985914d2d15c794a5fbaf3b13ea9dc3db.zip
kernel_samsung_tuna-e9f3f9a985914d2d15c794a5fbaf3b13ea9dc3db.tar.gz
kernel_samsung_tuna-e9f3f9a985914d2d15c794a5fbaf3b13ea9dc3db.tar.bz2
omap: gpio: put_sync_suspend instead of put_sync in free
put_sync might sleep and omap_gpio_free is calling it between spinlocks thus changing it to put_sync_suspend to avoid the following warning: [ 104.568847] BUG: sleeping function called from invalid context at drivers/base/power/runtime.c:735 [ 104.578460] in_atomic(): 1, irqs_disabled(): 128, pid: 297, name: kworker/0:3 [ 104.586090] Backtrace: [ 104.588775] [<c00531c4>] (dump_backtrace+0x0/0x110) from [<c0574ae8>] (dump_stack+0x18/0x1c) [ 104.597747] r6:60000013 r5:ffff9e48 r4:00000000 r3:60000093 [ 104.603759] [<c0574ad0>] (dump_stack+0x0/0x1c) from [<c008337c>] (__might_sleep+0x130/0x134) [ 104.612701] [<c008324c>] (__might_sleep+0x0/0x134) from [<c02cf1b0>] (__pm_runtime_idle+0x94/0x98) [ 104.622192] r5:00000004 r4:c787ac08 [ 104.626007] [<c02cf11c>] (__pm_runtime_idle+0x0/0x98) from [<c0236cc8>] (omap_gpio_free+0xa0/0xb0) [ 104.635467] r7:00000013 r6:60000013 r5:c7877268 r4:c7877200 [ 104.641510] [<c0236c28>] (omap_gpio_free+0x0/0xb0) from [<c0235438>] (gpio_free+0xa4/0x108) [ 104.650329] r7:000000f9 r6:c787727c r5:c07acfe0 r4:00000053 [ 104.656372] [<c0235394>] (gpio_free+0x0/0x108) from [<c0277e3c>] (_resource_free+0x170/0x274) [ 104.665405] [<c0277ccc>] (_resource_free+0x0/0x274) from [<c0278ddc>] (rprm_cb+0x56c/0x604) [ 104.674255] r7:00000066 r6:c7a1ac08 r5:c7a14cd0 r4:00200200 [ 104.680267] [<c0278870>] (rprm_cb+0x0/0x604) from [<c0275910>] (rpmsg_recv_done+0xbc/0x17c) [ 104.689117] [<c0275854>] (rpmsg_recv_done+0x0/0x17c) from [<c0274b54>] (vring_interrupt+0x44/0x54) [ 104.698608] r8:00000004 r7:00000000 r6:00000002 r5:00000002 r4:c074f918 [ 104.705718] [<c0274b10>] (vring_interrupt+0x0/0x54) from [<c007b1cc>] (omap_rpmsg_mbox_callback+0x6c/0) [ 104.715972] [<c007b160>] (omap_rpmsg_mbox_callback+0x0/0xb8) from [<c00b8088>] (notifier_call_chain+0x) [ 104.726562] r5:00000000 r4:fffffffe [ 104.730346] [<c00b803c>] (notifier_call_chain+0x0/0x8c) from [<c00b8480>] (__blocking_notifier_call_ch) [ 104.741485] r8:c0749a88 r7:00000004 r6:00000002 r5:00000000 r4:c0749a68 [ 104.748413] r3:ffffffff [ 104.751220] [<c00b842c>] (__blocking_notifier_call_chain+0x0/0x6c) from [<c00b84b8>] (blocking_notifie) [ 104.763183] r8:00000004 r7:00000000 r6:c63ab434 r5:c6fcbefc r4:c63ab420 [ 104.770294] [<c00b8498>] (blocking_notifier_call_chain+0x0/0x28) from [<c007fe54>] (mbox_rx_work+0x84/) [ 104.780639] [<c007fdd0>] (mbox_rx_work+0x0/0xe8) from [<c00aaf40>] (process_one_work+0x114/0x410) [ 104.790008] r8:c007fdd0 r7:00000000 r6:c1837500 r5:c18335c0 r4:c6f3b580 [ 104.797149] [<c00aae2c>] (process_one_work+0x0/0x410) from [<c00ab5e4>] (worker_thread+0x1a8/0x490) [ 104.806732] [<c00ab43c>] (worker_thread+0x0/0x490) from [<c00b2208>] (kthread+0x94/0x98) [ 104.815307] [<c00b2174>] (kthread+0x0/0x98) from [<c009860c>] (do_exit+0x0/0x720) [ 104.823211] r7:00000013 r6:c009860c r5:c00b2174 r4:c7909e94 Change-Id: I051f13d82d6b776641ebd65ff16f9ce0f02fdf57 Signed-off-by: Miguel Vadillo <vadillo@ti.com>
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/gpio-omap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index 03ee9c6..d91a5aa 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -593,9 +593,9 @@ static void omap_gpio_free(struct gpio_chip *chip, unsigned offset)
* disable the bank module.
*/
if (!bank->mod_usage) {
- if (pm_runtime_put_sync(bank->dev) < 0) {
+ if (pm_runtime_put_sync_suspend(bank->dev)) {
dev_err(bank->dev, "%s: GPIO bank %d "
- "pm_runtime_put_sync failed\n",
+ "pm_runtime_put_sync_suspend failed\n",
__func__, bank->id);
}
}