From 9e03d05eee4ca45ed12749ef6c26bf616262cdd2 Mon Sep 17 00:00:00 2001 From: Jingoo Han Date: Wed, 4 Dec 2013 14:13:50 +0900 Subject: [PATCH] spi: rcar: Use devm_spi_register_master() Use devm_spi_register_master() to make cleanup paths simpler. Signed-off-by: Jingoo Han Signed-off-by: Mark Brown --- drivers/spi/spi-rspi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c index 19c65c43cbc5..cfdbb422a40a 100644 --- a/drivers/spi/spi-rspi.c +++ b/drivers/spi/spi-rspi.c @@ -887,7 +887,6 @@ static int rspi_remove(struct platform_device *pdev) { struct rspi_data *rspi = platform_get_drvdata(pdev); - spi_unregister_master(rspi->master); rspi_release_dma(rspi); return 0; @@ -972,7 +971,7 @@ static int rspi_probe(struct platform_device *pdev) goto error2; } - ret = spi_register_master(master); + ret = devm_spi_register_master(&pdev->dev, master); if (ret < 0) { dev_err(&pdev->dev, "spi_register_master error.\n"); goto error2; -- 2.30.2