mirror of https://gitee.com/openkylin/linux.git
spi: rcar: Use devm_spi_register_master()
Use devm_spi_register_master() to make cleanup paths simpler. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
This commit is contained in:
parent
e80b89ee2a
commit
9e03d05eee
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue