summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-ti-qspi.c
diff options
context:
space:
mode:
authorFelipe Balbi <balbi@ti.com>2015-10-29 14:57:30 +0100
committerMark Brown <broonie@kernel.org>2015-10-30 02:24:57 +0100
commite6b5140b706689a38aaeabd9de8fb3e1531cf9cb (patch)
treeaa01de118317a2183a304e85be96980d085b3878 /drivers/spi/spi-ti-qspi.c
parentspi: spi-ti-qspi: switch to polling mode for better r/w performance (diff)
downloadlinux-e6b5140b706689a38aaeabd9de8fb3e1531cf9cb.tar.xz
linux-e6b5140b706689a38aaeabd9de8fb3e1531cf9cb.zip
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: Felipe Balbi <balbi@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-ti-qspi.c')
-rw-r--r--drivers/spi/spi-ti-qspi.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/spi/spi-ti-qspi.c b/drivers/spi/spi-ti-qspi.c
index 89cf0c821524..432bcc374d50 100644
--- a/drivers/spi/spi-ti-qspi.c
+++ b/drivers/spi/spi-ti-qspi.c
@@ -555,16 +555,7 @@ free_master:
static int ti_qspi_remove(struct platform_device *pdev)
{
- struct ti_qspi *qspi = platform_get_drvdata(pdev);
- 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_put_sync(&pdev->dev);
pm_runtime_disable(&pdev->dev);
return 0;