From: Jingoo Han Date: Wed, 4 Dec 2013 05:13:50 +0000 (+0900) Subject: spi: rcar: Use devm_spi_register_master() X-Git-Tag: firefly_0821_release~176^2~4567^2~4^6~1^2~1^2~1 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=9e03d05eee4ca45ed12749ef6c26bf616262cdd2;p=firefly-linux-kernel-4.4.55.git 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 --- 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;