diff options
author | Felipe Balbi <balbi@ti.com> | 2015-10-29 09:57:30 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-10-29 21:24:57 -0400 |
commit | e6b5140b706689a38aaeabd9de8fb3e1531cf9cb (patch) | |
tree | aa01de118317a2183a304e85be96980d085b3878 | |
parent | 57c2ecd9bf971946ea0c6ae90a79c90a22159c73 (diff) |
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>
-rw-r--r-- | drivers/spi/spi-ti-qspi.c | 11 |
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: | |||
555 | 555 | ||
556 | static int ti_qspi_remove(struct platform_device *pdev) | 556 | static int ti_qspi_remove(struct platform_device *pdev) |
557 | { | 557 | { |
558 | struct ti_qspi *qspi = platform_get_drvdata(pdev); | 558 | pm_runtime_put_sync(&pdev->dev); |
559 | int ret; | ||
560 | |||
561 | ret = pm_runtime_get_sync(qspi->dev); | ||
562 | if (ret < 0) { | ||
563 | dev_err(qspi->dev, "pm_runtime_get_sync() failed\n"); | ||
564 | return ret; | ||
565 | } | ||
566 | |||
567 | pm_runtime_put(qspi->dev); | ||
568 | pm_runtime_disable(&pdev->dev); | 559 | pm_runtime_disable(&pdev->dev); |
569 | 560 | ||
570 | return 0; | 561 | return 0; |