Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Felipe Balbi and committed by
Mark Brown
e6b5140b 57c2ecd9

+1 -10
+1 -10
drivers/spi/spi-ti-qspi.c
··· 555 555 556 556 static int ti_qspi_remove(struct platform_device *pdev) 557 557 { 558 - struct ti_qspi *qspi = platform_get_drvdata(pdev); 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); 558 + pm_runtime_put_sync(&pdev->dev); 568 559 pm_runtime_disable(&pdev->dev); 569 560 570 561 return 0;