|
@@ -1235,7 +1235,8 @@ static int omap8250_probe(struct platform_device *pdev)
|
|
|
pm_runtime_put_autosuspend(&pdev->dev);
|
|
|
return 0;
|
|
|
err:
|
|
|
- pm_runtime_put(&pdev->dev);
|
|
|
+ pm_runtime_dont_use_autosuspend(&pdev->dev);
|
|
|
+ pm_runtime_put_sync(&pdev->dev);
|
|
|
pm_runtime_disable(&pdev->dev);
|
|
|
return ret;
|
|
|
}
|
|
@@ -1244,6 +1245,7 @@ static int omap8250_remove(struct platform_device *pdev)
|
|
|
{
|
|
|
struct omap8250_priv *priv = platform_get_drvdata(pdev);
|
|
|
|
|
|
+ pm_runtime_dont_use_autosuspend(&pdev->dev);
|
|
|
pm_runtime_put_sync(&pdev->dev);
|
|
|
pm_runtime_disable(&pdev->dev);
|
|
|
serial8250_unregister_port(priv->line);
|
|
@@ -1343,6 +1345,10 @@ static int omap8250_runtime_suspend(struct device *dev)
|
|
|
struct omap8250_priv *priv = dev_get_drvdata(dev);
|
|
|
struct uart_8250_port *up;
|
|
|
|
|
|
+ /* In case runtime-pm tries this before we are setup */
|
|
|
+ if (!priv)
|
|
|
+ return 0;
|
|
|
+
|
|
|
up = serial8250_get_port(priv->line);
|
|
|
/*
|
|
|
* When using 'no_console_suspend', the console UART must not be
|