@@ -1300,6 +1300,7 @@ static int serial_omap_probe(struct platform_device *pdev)
serial_omap_uart_wq = create_singlethread_workqueue(up->name);
INIT_WORK(&up->qos_work, serial_omap_uart_qos_work);
+ platform_set_drvdata(pdev, up);
pm_runtime_use_autosuspend(&pdev->dev);
pm_runtime_set_autosuspend_delay(&pdev->dev,
omap_up_info->autosuspend_timeout);
@@ -1319,7 +1320,6 @@ static int serial_omap_probe(struct platform_device *pdev)
pm_runtime_mark_last_busy(up->dev);
pm_runtime_put_autosuspend(up->dev);
- platform_set_drvdata(pdev, up);
return 0;
err_add_port: