提交 e6b5140b 编写于 作者: F Felipe Balbi 提交者: Mark Brown

spi: ti-qspi: improve ->remove() callback

there's no need to call pm_runtime_get_sync()
followed by pm_runtime_put(). We should, instead,
just call pm_runtime_put_sync() and pm_runtime_disable().
Signed-off-by: NFelipe Balbi <balbi@ti.com>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 57c2ecd9
...@@ -555,16 +555,7 @@ static int ti_qspi_probe(struct platform_device *pdev) ...@@ -555,16 +555,7 @@ static int ti_qspi_probe(struct platform_device *pdev)
static int ti_qspi_remove(struct platform_device *pdev) static int ti_qspi_remove(struct platform_device *pdev)
{ {
struct ti_qspi *qspi = platform_get_drvdata(pdev); pm_runtime_put_sync(&pdev->dev);
int ret;
ret = pm_runtime_get_sync(qspi->dev);
if (ret < 0) {
dev_err(qspi->dev, "pm_runtime_get_sync() failed\n");
return ret;
}
pm_runtime_put(qspi->dev);
pm_runtime_disable(&pdev->dev); pm_runtime_disable(&pdev->dev);
return 0; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册