Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e6b5140b authored by Felipe Balbi's avatar Felipe Balbi Committed by Mark Brown
Browse files

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: default avatarFelipe Balbi <balbi@ti.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 57c2ecd9
Loading
Loading
Loading
Loading
+1 −10
Original line number Diff line number Diff line
@@ -555,16 +555,7 @@ static int ti_qspi_probe(struct platform_device *pdev)

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;