diff options
author | Felipe Balbi <balbi@ti.com> | 2012-09-06 08:45:27 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-09-06 12:17:01 -0400 |
commit | 93220dcc3052182e7156c09655ad1316055564b9 (patch) | |
tree | 54d878de5d3f57f86897c23e86b8493e703ad7b7 /drivers | |
parent | 660ac5f48a64026ad54c77d06f8360544e84dc84 (diff) |
serial: omap: set dev->drvdata before enabling pm_runtime
by the time we call our first pm_runtme_get_sync()
after enable pm_runtime, our resume method might
be called. To avoid problems, we must make sure
that our dev->drvdata is set correctly before
our resume method gets called.
Tested-by: Shubhrajyoti D <shubhrajyoti@ti.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/tty/serial/omap-serial.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c index b2043df42a4f..8a696a4efbee 100644 --- a/drivers/tty/serial/omap-serial.c +++ b/drivers/tty/serial/omap-serial.c | |||
@@ -1333,6 +1333,7 @@ static int serial_omap_probe(struct platform_device *pdev) | |||
1333 | serial_omap_uart_wq = create_singlethread_workqueue(up->name); | 1333 | serial_omap_uart_wq = create_singlethread_workqueue(up->name); |
1334 | INIT_WORK(&up->qos_work, serial_omap_uart_qos_work); | 1334 | INIT_WORK(&up->qos_work, serial_omap_uart_qos_work); |
1335 | 1335 | ||
1336 | platform_set_drvdata(pdev, up); | ||
1336 | pm_runtime_use_autosuspend(&pdev->dev); | 1337 | pm_runtime_use_autosuspend(&pdev->dev); |
1337 | pm_runtime_set_autosuspend_delay(&pdev->dev, | 1338 | pm_runtime_set_autosuspend_delay(&pdev->dev, |
1338 | omap_up_info->autosuspend_timeout); | 1339 | omap_up_info->autosuspend_timeout); |
@@ -1352,7 +1353,6 @@ static int serial_omap_probe(struct platform_device *pdev) | |||
1352 | 1353 | ||
1353 | pm_runtime_mark_last_busy(up->dev); | 1354 | pm_runtime_mark_last_busy(up->dev); |
1354 | pm_runtime_put_autosuspend(up->dev); | 1355 | pm_runtime_put_autosuspend(up->dev); |
1355 | platform_set_drvdata(pdev, up); | ||
1356 | return 0; | 1356 | return 0; |
1357 | 1357 | ||
1358 | err_add_port: | 1358 | err_add_port: |