@@ -1148,7 +1148,7 @@ static int spi_geni_probe(struct platform_device *pdev)
if (ret)
goto spi_geni_release_dma;
- ret = spi_register_controller(spi);
+ ret = devm_spi_register_controller(dev, spi);
if (ret)
goto spi_geni_release_dma;
@@ -1164,9 +1164,6 @@ static void spi_geni_remove(struct platform_device *pdev)
struct spi_controller *spi = platform_get_drvdata(pdev);
struct spi_geni_master *mas = spi_controller_get_devdata(spi);
- /* Unregister _before_ disabling pm_runtime() so we stop transfers */
- spi_unregister_controller(spi);
-
spi_geni_release_dma_chan(mas);
}
Use devm_spi_register_controller() in the Qualcomm GENI based SPI controller driver, which avoid having to manually call spi_unregister_controller() in the remove function. Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com> --- drivers/spi/spi-geni-qcom.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)